projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbb23ce
)
fixed a problem in bioOlderJobType() when there are no jobs of the specified type...
author
antirez
<antirez@gmail.com>
Thu, 15 Sep 2011 16:23:58 +0000
(18:23 +0200)
committer
antirez
<antirez@gmail.com>
Thu, 15 Sep 2011 16:23:58 +0000
(18:23 +0200)
src/bio.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bio.c
b/src/bio.c
index 6f2c8a6c0d49d96e7a60722a31fd6428d27d085d..fc4d56695924fb17381dbcf8eaadd641cdb686c4 100644
(file)
--- a/
src/bio.c
+++ b/
src/bio.c
@@
-188,6
+188,10
@@
time_t bioOlderJobOfType(int type) {
pthread_mutex_lock(&bio_mutex[type]);
ln = listFirst(bio_jobs[type]);
+ if (ln == NULL) {
+ pthread_mutex_unlock(&bio_mutex[type]);
+ return 0;
+ }
job = ln->value;
time = job->time;
pthread_mutex_unlock(&bio_mutex[type]);