summaryrefslogtreecommitdiffstats
path: root/sbin/md5
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1997-12-29 14:05:49 +0000
committersteve <steve@FreeBSD.org>1997-12-29 14:05:49 +0000
commit6f5cdf1a51f25cfc3ada1e9937857b54783e6e13 (patch)
tree44fcad04fd4fe745a1de79b1c6f33de435a73395 /sbin/md5
parent841d24202de3782af744cfccf5eeaf2ad7c92835 (diff)
downloadFreeBSD-src-6f5cdf1a51f25cfc3ada1e9937857b54783e6e13.zip
FreeBSD-src-6f5cdf1a51f25cfc3ada1e9937857b54783e6e13.tar.gz
Fix a few style nits from previous commit.
Submitted by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sbin/md5')
-rw-r--r--sbin/md5/md5.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
index 1ab1051..dda9e75 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);
}
OpenPOWER on IntegriCloud