fix possibly garbage value returned in cert_process_revoker
authorPetr Štetiar <ynezz@true.cz>
Mon, 16 Dec 2019 13:34:20 +0000 (14:34 +0100)
committerPetr Štetiar <ynezz@true.cz>
Mon, 16 Dec 2019 19:52:58 +0000 (20:52 +0100)
Fixes following warning reported by clang-9 scan-build analyzer:

 ucert.c:585:2: warning: Undefined or garbage value returned to caller
        return ret;
        ^~~~~~~~~~

Signed-off-by: Petr Štetiar <ynezz@true.cz>
ucert.c

diff --git a/ucert.c b/ucert.c
index 8503eeb26cd85efd04cc7bc00b02617e6ba773c3..b9c5c889ddfad04fb81ab4cb882c45160355b10e 100644 (file)
--- a/ucert.c
+++ b/ucert.c
@@ -508,7 +508,7 @@ static int cert_process_revoker(const char *certfile, const char *pubkeydir) {
        char *fingerprint;
        char rfname[512];
 
-       int ret;
+       int ret = -1;
 
        if (cert_load(certfile, &certchain)) {
                DPRINTF("cannot parse cert\n");