summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-12 23:33:03 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-12 23:33:03 +0000
commit8242cdecd0c33f31c8d3f9528342d174b63fd9f3 (patch)
tree0c451b52babe25027d454674d8ca862361e1f10b /bin
parentaa4b1d9547d3db3eb9b4614f8d43bc30c95494e7 (diff)
-Wall happiness
Diffstat (limited to 'bin')
-rw-r--r--bin/md5/Makefile3
-rw-r--r--bin/md5/md5.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/md5/Makefile b/bin/md5/Makefile
index 99e2edcac40..62fccb4c23e 100644
--- a/bin/md5/Makefile
+++ b/bin/md5/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.1 1996/06/11 10:37:34 deraadt Exp $
+# $OpenBSD: Makefile,v 1.2 1996/11/12 23:33:01 niklas Exp $
PROG= md5
SRCS= md5.c
+COPTS+= -Wall
.include <bsd.prog.mk>
diff --git a/bin/md5/md5.c b/bin/md5/md5.c
index 8376e537455..5f0d6fbc251 100644
--- a/bin/md5/md5.c
+++ b/bin/md5/md5.c
@@ -1,5 +1,5 @@
/*
- * $OpenBSD: md5.c,v 1.1 1996/06/11 10:37:38 deraadt Exp $
+ * $OpenBSD: md5.c,v 1.2 1996/11/12 23:33:02 niklas Exp $
*
* Derived from:
*/
@@ -159,11 +159,11 @@ MDFilter(int pipe)
{
MD5_CTX context;
int len;
- unsigned char buffer[BUFSIZ], digest[16];
+ unsigned char buffer[BUFSIZ];
char buf[33];
MD5Init(&context);
- while (len = fread(buffer, 1, BUFSIZ, stdin)) {
+ while ((len = fread(buffer, 1, BUFSIZ, stdin)) > 0) {
if(pipe && (len != fwrite(buffer, 1, len, stdout))) {
perror("stdout");
exit(1);