Commit 58bba40a039449edfd6326ed47e2f1c608352004

Con Kolivas 2012-10-07T10:19:52

fds need to be zeroed before set in modminer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/driver-modminer.c b/driver-modminer.c
index d15f2d8..cc8d162 100644
--- a/driver-modminer.c
+++ b/driver-modminer.c
@@ -128,6 +128,7 @@ modminer_detect()
 } while(0)
 
 #define status_read(eng)  do {  \
+FD_ZERO(&fds); \
 FD_SET(fd, &fds);  \
 select(fd+1, &fds, NULL, NULL, NULL);  \
 	if (1 != read(fd, buf, 1))  \
@@ -139,7 +140,7 @@ select(fd+1, &fds, NULL, NULL, NULL);  \
 static bool
 modminer_fpga_upload_bitstream(struct cgpu_info*modminer)
 {
-fd_set fds;
+	fd_set fds;
 	char buf[0x100];
 	unsigned char *ubuf = (unsigned char*)buf;
 	unsigned long len;