From 0158000c03d51b01208ae053a80a9073f2a4e0f9 Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Sun, 6 Mar 2022 11:39:14 -0800 Subject: [PATCH] bin/xbps-fetch: fix unreachable fetch result code This commit restores the formerly unreachable code path handling the case where the local file is identical with the remote file. Fixes bug introduced in 66f84a8b59f62b9e1e6cba9d4258851102392cf1 --- bin/xbps-fetch/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-fetch/main.c b/bin/xbps-fetch/main.c index dc7eb0fe..845763c0 100644 --- a/bin/xbps-fetch/main.c +++ b/bin/xbps-fetch/main.c @@ -166,7 +166,7 @@ main(int argc, char **argv) progname, argv[i], xbps_fetch_error_string()); failure = true; continue; - } else if (rv == -1) { + } else if (rv == 0) { fprintf(stderr, "%s: file is identical with remote.\n", argv[i]); if (shasum) { if (!xbps_file_sha256_raw(digest, sizeof digest, filename)) {