summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-11-12 23:33:01 +0000
committerniklas <niklas@openbsd.org>1996-11-12 23:33:01 +0000
commitcbf63202e488cc24189694b55ffe8d91de7a16ae (patch)
tree2372cffcb7f442b37e85c05b1321109fc660556f
parentArrival of new bus.h from NetBSD (diff)
downloadwireguard-openbsd-cbf63202e488cc24189694b55ffe8d91de7a16ae.tar.xz
wireguard-openbsd-cbf63202e488cc24189694b55ffe8d91de7a16ae.zip
-Wall happiness
-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);