From 9a9791af6e20375e5be1fc4a5ffec3ed1a94ccd7 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 29 Dec 1997 14:05:49 +0000 Subject: [PATCH] Fix a few style nits from previous commit. Submitted by: Bruce Evans --- sbin/md5/md5.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 1ab105146943..dda9e753ceca 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -1,5 +1,5 @@ /* - * $Id: md5.c,v 1.10 1997/02/22 14:32:37 peter Exp $ + * $Id: md5.c,v 1.11 1997/12/29 03:40:37 steve Exp $ * * Derived from: */ @@ -57,13 +57,13 @@ main(argc, argv) int argc; char *argv[]; { - int i; + int ch; char *p; char buf[33]; if (argc > 1) { - while ((i = getopt(argc, argv, "ps:tx")) != EOF) { - switch (i) { + while ((ch = getopt(argc, argv, "ps:tx")) != -1) { + switch (ch) { case 'p': MDFilter(1); break; @@ -152,6 +152,7 @@ MDTimeTrial() static void MDTestSuite() { + printf("MD5 test suite:\n"); MDString(""); @@ -170,7 +171,8 @@ MDTestSuite() * Digests the standard input and prints the result. */ static void -MDFilter(int pipe) +MDFilter(pipe) + int pipe; { MD5_CTX context; int len; @@ -188,13 +190,10 @@ MDFilter(int pipe) printf("%s\n", MD5End(&context,buf)); } -/* - * Displays a usage summary. - */ static void -usage(void) +usage() { - (void)fprintf(stderr, - "usage: md5 [-ptx] [-s string] [file ...]\n"); + + fprintf(stderr, "usage: md5 [-ptx] [-s string] [files ...]\n"); exit(1); }