Commit 5a861bf1e42cc56ad8c6477e5d348f76b09d1363

Con Kolivas 2011-07-19T09:23:04

total_queued should always be >= total_staged

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index c1591a8..67e9586 100644
--- a/main.c
+++ b/main.c
@@ -1191,7 +1191,7 @@ static void inc_queued(void)
 static void dec_queued(void)
 {
 	pthread_mutex_lock(&qd_lock);
-	if (total_queued > 0)
+	if (total_queued > total_staged)
 		total_queued--;
 	pthread_mutex_unlock(&qd_lock);
 	dec_staged(1);