aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rcynic/rcynic.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/rcynic/rcynic.c b/rcynic/rcynic.c
index bafbcae7..972c83fd 100644
--- a/rcynic/rcynic.c
+++ b/rcynic/rcynic.c
@@ -682,14 +682,12 @@ static int rsync_cached(const rcynic_ctx_t *rc,
strcpy(buffer, uri);
if ((s = strrchr(buffer, '/')) != NULL && s[1] == '\0')
*s = '\0';
- for (;;) {
- if (sk_find(rc->rsync_cache, buffer) >= 0)
- return 1;
+ while (sk_find(rc->rsync_cache, buffer) < 0) {
if ((s = strrchr(buffer, '/')) == NULL)
- break;
+ return 0;
*s = '\0';
}
- return 0;
+ return 1;
}
static int rsync(const rcynic_ctx_t *rc,