hashsum.c: Return nonzero from `checkhash' on errors.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 25 Feb 2012 23:34:16 +0000 (23:34 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 25 Feb 2012 23:34:16 +0000 (23:34 +0000)
A serious bug: `checkhash' carefully maintained the `rc' variable -- and
then ignored it and always returned zero anyway.

hashsum.c

index d12c506..820cfbd 100644 (file)
--- a/hashsum.c
+++ b/hashsum.c
@@ -125,7 +125,7 @@ static int checkhash(const gchash *gch, unsigned f,
     moan("%lu of %lu file(s) failed %s check", nfail, n, hfp.gch->name);
   else if (!n)
     moan("no files checked");
-  return (0);
+  return (rc);
 }
 
 static int dohash(const gchash *gch, unsigned f,