Commit 82798f6f98bf530c438e008b9bccc40ad9e522af

Con Kolivas 2012-02-10T18:42:58

Merge pull request #111 from luke-jr/bugfix_bitforce_id Bugfix: BitFORCE index needs to be static to count correctly

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/bitforce.c b/bitforce.c
index 4081b71..939455b 100644
--- a/bitforce.c
+++ b/bitforce.c
@@ -72,7 +72,7 @@ static void BFwrite(int fd, const void *buf, size_t bufLen)
 static bool bitforce_detect_one(const char *devpath)
 {
 	char pdevbuf[0x100];
-	int i = 0;
+	static int i = 0;
 
 	if (total_devices == MAX_DEVICES)
 		return false;