diff options
author | phk <phk@FreeBSD.org> | 1995-02-26 02:00:35 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-02-26 02:00:35 +0000 |
commit | 1f2fc94f00d11d2badd39d400f1c364e851d9d10 (patch) | |
tree | d5459714b2f9fa47602d919070b2fc08ddd9bf50 /sbin/md5 | |
parent | 8c6185fb31cb6dc7fa159c68c10fe32a7726d477 (diff) | |
download | FreeBSD-src-1f2fc94f00d11d2badd39d400f1c364e851d9d10.zip FreeBSD-src-1f2fc94f00d11d2badd39d400f1c364e851d9d10.tar.gz |
oops.
Diffstat (limited to 'sbin/md5')
-rw-r--r-- | sbin/md5/md5.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 72af3eb..5a697f8 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -1,5 +1,5 @@ /* - * $Id: md5.c,v 1.2 1995/02/20 00:48:50 phk Exp $ + * $Id: md5.c,v 1.3 1995/02/26 01:55:31 phk Exp $ * * Derived from: */ @@ -67,7 +67,7 @@ main(argc, argv) MDTestSuite(); else { p = MD5File(argv[i]); - if (!p) + if (!p) perror(argv[i]); else printf("MD5 (%s) = %s\n", argv[i], p); @@ -161,8 +161,10 @@ MDFilter(int pipe) MD5Init(&context); while (len = fread(buffer, 1, BUFSIZ, stdin)) { - if(pipe && (len != fwrite(buffer, 1, len, stdout))) - perror(stdout); + if(pipe && (len != fwrite(buffer, 1, len, stdout))) { + perror("stdout"); + exit(1); + } MD5Update(&context, buffer, len); } printf("%s\n", MD5End(&context)); |