]> diplodocus.org Git - nmh/commitdiff
find_cache(): Remove test that's always false.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 14:11:18 +0000 (15:11 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 14:11:18 +0000 (15:11 +0100)
The if-statement's condition is a conjunctive that tests `!writing' and
then, only if that's true, calls find_cache_aux() and tests `writing' in
determining the first argument;  that must be false.  Bug pre-dates git
history.

uip/mhcachesbr.c

index 9b410e22058799bd549505be770e9b1acb24cfa9..b740e231e2e2ad58fc142136c95acbf4286281c1 100644 (file)
@@ -181,7 +181,7 @@ find_cache (CT ct, int policy, int *writing, char *id,
        case CACHE_PUBLIC:
            if (cache_private
                    && !writing
-                   && find_cache_aux (writing ? 2 : 0, cache_private, id,
+                   && find_cache_aux (0, cache_private, id,
                                       buffer, buflen) == OK) {
                if (access (buffer, R_OK) != NOTOK) {
 got_private: