From 86913036ac70a989594c94e6677ca5af7c6d7b8b Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 8 Aug 2014 00:41:48 +1000 Subject: [PATCH] ckdb - reload clear errno --- src/ckdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ckdb.c b/src/ckdb.c index 8a6b6b54..a8da6d35 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -7561,6 +7561,7 @@ static bool reload_from(tv_t *start) filename = rotating_filename(restorefrom, start->tv_sec); fp = fopen(filename, "r"); if (!fp) { + errno = 0; missing = filename; filename = NULL; missing_count = 1; @@ -7581,6 +7582,7 @@ static bool reload_from(tv_t *start) fp = fopen(filename, "r"); if (fp) break; + errno = 0; if (missing_count++ > 1) free(missing2); missing2 = filename;