Really fix verification error code to not depend on verbosity (RhBug:557101)
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 21 Jan 2010 12:14:28 +0000 (14:14 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 21 Jan 2010 12:14:28 +0000 (14:14 +0200)
- earlier fix from commit 6649c23cac5823d0c7415df5cfd66e5aac5eebd2 was
  broken as it could reset return code to zero after detecting errors
  earlier

lib/verify.c

index 44ab314..1068cfe 100644 (file)
@@ -353,7 +353,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, Header h)
            static const char *const aok = ".";
            static const char *const unknown = "?";
 
-           ec = (verifyResult != 0);
+           if (verifyResult) ec = 1;
 
 #define        _verify(_RPMVERIFY_F, _C)       \
        ((verifyResult & _RPMVERIFY_F) ? _C : aok)