Browse Source

Merge branch 'bfgminer-2.8.x' into bfgminer-2.9.x

Luke Dashjr 13 years ago
parent
commit
f07858c2dd
2 changed files with 3 additions and 3 deletions
  1. 1 1
      driver-ztex.c
  2. 2 2
      miner.c

+ 1 - 1
driver-ztex.c

@@ -150,7 +150,7 @@ static bool ztex_checkNonce(struct libztex_device *ztex,
                             struct libztex_hash_data *hdata)
 {
 	uint32_t *data32 = (uint32_t *)(work->data);
-	unsigned char swap[128];
+	unsigned char swap[80];
 	uint32_t *swap32 = (uint32_t *)swap;
 	unsigned char hash1[32];
 	unsigned char hash2[32];

+ 2 - 2
miner.c

@@ -2818,10 +2818,10 @@ static void get_benchmark_work(struct work *work)
 	// Use a random work block pulled from a pool
 	static uint8_t bench_block[] = { CGMINER_BENCHMARK_BLOCK };
 
-	size_t bench_size = sizeof(work);
+	size_t bench_size = sizeof(*work);
 	size_t work_size = sizeof(bench_block);
 	size_t min_size = (work_size < bench_size ? work_size : bench_size);
-	memset(work, 0, sizeof(work));
+	memset(work, 0, sizeof(*work));
 	memcpy(work, &bench_block, min_size);
 	work->mandatory = true;
 	work->pool = pools[0];