Commit 0eec99842478c1effe5ebf6ed3bd5abcd8e15ffd

Con Kolivas 2014-05-02T13:06:44

Avoid unnecessary deref now that it's done within discard_work

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index 32e06c7..413da1a 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6996,7 +6996,6 @@ struct work *get_work(struct thr_info *thr, const int thr_id)
 		work = hash_pop(true);
 		if (stale_work(work, false)) {
 			discard_work(work);
-			work = NULL;
 			wake_gws();
 		}
 	}
@@ -7416,7 +7415,6 @@ struct work *get_queued(struct cgpu_info *cgpu)
 		work = cgpu->unqueued_work;
 		if (unlikely(stale_work(work, false))) {
 			discard_work(work);
-			work = NULL;
 			wake_gws();
 		} else
 			__add_queued(cgpu, work);