diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-05-09 17:59:27 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-05-10 09:25:21 +0000 |
commit | facc213643f80bbdb0ebd76f5b26de84d95b9e1a (patch) | |
tree | 460e05aea860cdc750f0b3f28c7163a6fc35a265 /sbin/md5 | |
parent | 90eaf4b2f98f2678b3dc707f9781a887eee94b1a (diff) | |
download | src-facc213643f80bbdb0ebd76f5b26de84d95b9e1a.tar.gz src-facc213643f80bbdb0ebd76f5b26de84d95b9e1a.zip |
md5: Don't increment a bool.
Fixes: 4849767cb16a
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D40020
Diffstat (limited to 'sbin/md5')
-rw-r--r-- | sbin/md5/md5.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index b11fc6971735..202cc830d4ed 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -662,7 +662,7 @@ main(int argc, char *argv[]) } if (failed) return (1); - if (checksFailed != 0) + if (checksFailed > 0) return (2); return (0); @@ -759,7 +759,7 @@ MDOutput(const Algorithm_t *alg, char *p, const char *name) if (p == NULL) { warn("%s", name); - failed++; + failed = true; } else if (cflag && mode != mode_bsd) { checkfailed = strcasecmp(checkAgainst, p) != 0; if (!sflag && (!qflag || checkfailed)) @@ -1001,7 +1001,7 @@ MDTestSuite(const Algorithm_t *alg) printf(" - verified correct\n"); } else { printf(" - INCORRECT RESULT!\n"); - failed++; + failed = true; } } } |