summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-02-07 18:10:24 +0000
committerobrien <obrien@FreeBSD.org>2008-02-07 18:10:24 +0000
commit0ce48c9314898ffb73734bedee189ada28ab84a3 (patch)
treebb6a321ef71914a58b24ba8ade19cb9b037ba085 /sbin
parent61b5e535a556f8d583c1d0bfdbc90c59c8a97298 (diff)
downloadFreeBSD-src-0ce48c9314898ffb73734bedee189ada28ab84a3.zip
FreeBSD-src-0ce48c9314898ffb73734bedee189ada28ab84a3.tar.gz
style(9) (verifed no-change in .o's)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/md5/md5.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c
index fa853fb..7f837a3 100644
--- a/sbin/md5/md5.c
+++ b/sbin/md5/md5.c
@@ -79,7 +79,7 @@ typedef union {
RIPEMD160_CTX ripemd160;
} DIGEST_CTX;
-/* max(MD5_DIGEST_LENGTH, SHA_DIGEST_LENGTH,
+/* max(MD5_DIGEST_LENGTH, SHA_DIGEST_LENGTH,
SHA256_DIGEST_LENGTH, RIPEMD160_DIGEST_LENGTH)*2+1 */
#define HEX_DIGEST_LENGTH 65
@@ -118,22 +118,22 @@ Arguments (may be any combination):
int
main(int argc, char *argv[])
{
- int ch;
+ int ch;
char *p;
char buf[HEX_DIGEST_LENGTH];
- int failed;
+ int failed;
unsigned digest;
const char* progname;
-
+
if ((progname = strrchr(argv[0], '/')) == NULL)
progname = argv[0];
else
progname++;
-
+
for (digest = 0; digest < sizeof(Algorithm)/sizeof(*Algorithm); digest++)
if (strcasecmp(Algorithm[digest].progname, progname) == 0)
break;
-
+
if (digest == sizeof(Algorithm)/sizeof(*Algorithm))
digest = 0;
@@ -177,7 +177,8 @@ main(int argc, char *argv[])
else if (rflag)
printf("%s %s\n", p, *argv);
else
- printf("%s (%s) = %s\n", Algorithm[digest].name, *argv, p);
+ printf("%s (%s) = %s\n",
+ Algorithm[digest].name, *argv, p);
}
} while (*++argv);
} else if (!sflag && (optind == 1 || qflag || rflag))
@@ -185,7 +186,7 @@ main(int argc, char *argv[])
if (failed != 0)
return (1);
-
+
return (0);
}
/*
@@ -216,10 +217,9 @@ MDTimeTrial(Algorithm_t *alg)
float seconds;
unsigned char block[TEST_BLOCK_LEN];
unsigned int i;
- char *p, buf[HEX_DIGEST_LENGTH];
+ char *p, buf[HEX_DIGEST_LENGTH];
- printf
- ("%s time trial. Digesting %d %d-byte blocks ...",
+ printf("%s time trial. Digesting %d %d-byte blocks ...",
alg->name, TEST_BLOCK_COUNT, TEST_BLOCK_LEN);
fflush(stdout);
@@ -244,8 +244,7 @@ MDTimeTrial(Algorithm_t *alg)
printf(" done\n");
printf("Digest = %s", p);
printf("\nTime = %f seconds\n", seconds);
- printf
- ("Speed = %f bytes/second\n",
+ printf("Speed = %f bytes/second\n",
(float) TEST_BLOCK_LEN * (float) TEST_BLOCK_COUNT / seconds);
}
/*
@@ -253,7 +252,7 @@ MDTimeTrial(Algorithm_t *alg)
*/
const char *MDTestInput[MDTESTCOUNT] = {
- "",
+ "",
"a",
"abc",
"message digest",
OpenPOWER on IntegriCloud