sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 76ea3fdd52d306faffb8b40842c73639fbbfc957
parent e11717ab3b8d0022372aac49389f125ffc8a8ca7
Author: sin <sin@2f30.org>
Date:   Wed, 11 Mar 2015 12:32:44 +0000

cksum: Report exit status properly

Diffstat:
Mcksum.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cksum.c b/cksum.c @@ -94,6 +94,7 @@ int main(int argc, char *argv[]) { FILE *fp; + int ret = 0; ARGBEGIN { default: @@ -106,6 +107,7 @@ main(int argc, char *argv[]) for (; *argv; argc--, argv++) { if (!(fp = fopen(*argv, "r"))) { weprintf("fopen %s:", *argv); + ret = 1; continue; } cksum(fp, *argv); @@ -113,5 +115,5 @@ main(int argc, char *argv[]) } } - return 0; + return ret; }