aboutsummaryrefslogtreecommitdiff
path: root/cgit.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/cgit.c b/cgit.c
index 0f72f2d..d1abaa0 100644
--- a/cgit.c
+++ b/cgit.c
@@ -61,19 +61,13 @@ static void cgit_check_cache(struct cacheitem *item)
sleep(1);
goto top;
}
- if (!cache_exist(item)) {
+ if (!cache_exist(item))
cgit_fill_cache(item);
- cache_unlock(item);
- } else {
- cache_cancel_lock(item);
- }
+ cache_unlock(item);
} else if (cache_expired(item) && cache_lock(item)) {
- if (cache_expired(item)) {
+ if (cache_expired(item))
cgit_fill_cache(item);
- cache_unlock(item);
- } else {
- cache_cancel_lock(item);
- }
+ cache_unlock(item);
}
}