Commit ef54de1dd3d7af92a0672c9d25e6c7fee46f811c

Kano 2013-09-19T23:23:36

klondike use a memcpy

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-klondike.c b/driver-klondike.c
index 0ebdd7a..78f9bec 100644
--- a/driver-klondike.c
+++ b/driver-klondike.c
@@ -172,7 +172,7 @@ static bool klondike_get_stats(struct cgpu_info *klncgpu)
 	for (dev = 0; dev <= slaves; dev++) {
 		char *reply = SendCmdGetReply(klncgpu, 'S', dev, 0, NULL);
 		if (reply != NULL)
-			klninfo->status[dev] = *(WORKSTATUS *)(reply+2);
+			memcpy((void *)(&(klninfo->status[dev])), reply+2, sizeof(klninfo->status[dev]));
 	}
 	wr_unlock(&(klninfo->stat_lock));