Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcrypt Cosmetic nits.



details:   https://anonhg.NetBSD.org/src/rev/ea750c2f6dd6
branches:  trunk
changeset: 495708:ea750c2f6dd6
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Aug 03 08:32:36 2000 +0000

description:
Cosmetic nits.

diffstat:

 lib/libcrypt/md5crypt.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (77 lines):

diff -r 1649df0807fc -r ea750c2f6dd6 lib/libcrypt/md5crypt.c
--- a/lib/libcrypt/md5crypt.c   Thu Aug 03 08:30:43 2000 +0000
+++ b/lib/libcrypt/md5crypt.c   Thu Aug 03 08:32:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md5crypt.c,v 1.1 2000/07/06 11:12:42 ad Exp $  */
+/*     $NetBSD: md5crypt.c,v 1.2 2000/08/03 08:32:36 ad Exp $  */
 
 /*
  * ----------------------------------------------------------------------------
@@ -15,7 +15,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: md5crypt.c,v 1.1 2000/07/06 11:12:42 ad Exp $");
+__RCSID("$NetBSD: md5crypt.c,v 1.2 2000/08/03 08:32:36 ad Exp $");
 #endif /* not lint */
 
 #include <unistd.h>
@@ -66,11 +66,11 @@
        sp = salt;
 
        /* If it starts with the magic string, then skip that */
-       if(strncmp(sp, MD5_MAGIC, MD5_MAGIC_LEN) == 0)
+       if (strncmp(sp, MD5_MAGIC, MD5_MAGIC_LEN) == 0)
                sp += MD5_MAGIC_LEN;
 
        /* It stops at the first '$', max 8 chars */
-       for(ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++)
+       for (ep = sp; *ep != '\0' && *ep != '$' && ep < (sp + 8); ep++)
                continue;
 
        /* get the length of the true salt */
@@ -94,7 +94,7 @@
        MD5Update(&ctx1, (const unsigned char *)pw, pwl);
        MD5Final(final, &ctx1);
 
-       for(pl = pwl; pl > 0; pl -= 16)
+       for (pl = pwl; pl > 0; pl -= 16)
                MD5Update(&ctx, final, (unsigned int)(pl > 16 ? 16 : pl));
 
        /* Don't leave anything around in vm they could use. */
@@ -102,7 +102,7 @@
 
        /* Then something really weird... */
        for (i = pwl; i != 0; i >>= 1)
-               if((i & 1) != 0)
+               if ((i & 1) != 0)
                    MD5Update(&ctx, final, 1);
                else
                    MD5Update(&ctx, (const unsigned char *)pw, 1);
@@ -119,21 +119,21 @@
         * Pentium this takes 34 msec, so you would need 30 seconds to build
         * a 1000 entry dictionary...
         */
-       for(i = 0; i < 1000; i++) {
+       for (i = 0; i < 1000; i++) {
                MD5Init(&ctx1);
 
-               if((i & 1) != 0)
+               if ((i & 1) != 0)
                        MD5Update(&ctx1, (const unsigned char *)pw, pwl);
                else
                        MD5Update(&ctx1, final, 16);
 
-               if((i % 3) != 0)
+               if ((i % 3) != 0)
                        MD5Update(&ctx1, (const unsigned char *)sp, sl);
 
-               if((i % 7) != 0)
+               if ((i % 7) != 0)
                        MD5Update(&ctx1, (const unsigned char *)pw, pwl);
 
-               if((i & 1) != 0)
+               if ((i & 1) != 0)
                        MD5Update(&ctx1, final, 16);
                else
                        MD5Update(&ctx1, (const unsigned char *)pw, pwl);



Home | Main Index | Thread Index | Old Index