aboutsummaryrefslogtreecommitdiff
path: root/sbin/md5/md5.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1995-02-26 02:00:35 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1995-02-26 02:00:35 +0000
commitc8006b150006f6c0867c3750dfb16097b55d7587 (patch)
treed5459714b2f9fa47602d919070b2fc08ddd9bf50 /sbin/md5/md5.c
parent23b406e176386f62cef07ec8c3dd5fae9b640dff (diff)
downloadsrc-c8006b150006f6c0867c3750dfb16097b55d7587.tar.gz
src-c8006b150006f6c0867c3750dfb16097b55d7587.zip
oops.
Notes
Notes: svn path=/head/; revision=6726
Diffstat (limited to 'sbin/md5/md5.c')
-rw-r--r--sbin/md5/md5.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
index 72af3ebb9e0c..5a697f831970 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));