Commit b39a4d0b authored by antirez's avatar antirez
Browse files

fixed a problem in bioOlderJobType() when there are no jobs of the specified...

fixed a problem in bioOlderJobType() when there are no jobs of the specified type. Now the function returns 0 when this happens.
parent fbb23ce4
......@@ -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]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment