reindent-20030715
[openafs.git] / src / des / cksum.c
index f4eda47..fdb24f7 100644 (file)
@@ -20,7 +20,8 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID("$Header$");
+RCSID
+    ("$Header$");
 
 #include <mit-cpyright.h>
 #ifndef KERNEL
@@ -62,24 +63,24 @@ RCSID("$Header$");
     des_cblock *iv;            * 8 bytes of ivec *
 */
 
-afs_uint32 des_cbc_cksum(des_cblock *in, des_cblock *out,
-       register afs_int32 length, des_key_schedule key, des_cblock *iv)
+afs_uint32
+des_cbc_cksum(des_cblock * in, des_cblock * out, register afs_int32 length,
+             des_key_schedule key, des_cblock * iv)
 {
     register afs_uint32 *input = (afs_uint32 *) in;
     register afs_uint32 *output = (afs_uint32 *) out;
     afs_uint32 *ivec = (afs_uint32 *) iv;
 
-    afs_uint32 i,j;
+    afs_uint32 i, j;
     afs_uint32 t_input[2];
     afs_uint32 t_output[8];
-    unsigned char *t_in_p = (unsigned char *) t_input;
+    unsigned char *t_in_p = (unsigned char *)t_input;
 
 #ifdef MUSTALIGN
     if ((afs_int32) ivec & 3) {
        memcpy((char *)&t_output[0], (char *)ivec++, sizeof(t_output[0]));
        memcpy((char *)&t_output[1], (char *)ivec, sizeof(t_output[1]));
-    }
-    else
+    } else
 #endif
     {
        t_output[0] = *ivec++;
@@ -92,8 +93,7 @@ afs_uint32 des_cbc_cksum(des_cblock *in, des_cblock *out,
        if ((afs_int32) input & 3) {
            memcpy((char *)&t_input[0], (char *)input++, sizeof(t_input[0]));
            memcpy((char *)&t_input[1], (char *)input++, sizeof(t_input[1]));
-       }
-       else
+       } else
 #endif
        {
            t_input[0] = *input++;
@@ -103,21 +103,21 @@ afs_uint32 des_cbc_cksum(des_cblock *in, des_cblock *out,
        /* zero pad */
        if (length < 8)
            for (j = length; j <= 7; j++)
-               *(t_in_p+j)= 0;
+               *(t_in_p + j) = 0;
 
 #ifdef DEBUG
        if (des_debug)
-           des_debug_print("clear",length,t_input[0],t_input[1]);
+           des_debug_print("clear", length, t_input[0], t_input[1]);
 #endif
        /* do the xor for cbc into the temp */
-       t_input[0] ^= t_output[0] ;
-       t_input[1] ^= t_output[1] ;
+       t_input[0] ^= t_output[0];
+       t_input[1] ^= t_output[1];
        /* encrypt */
-       (void) des_ecb_encrypt(t_input,t_output,key,1);
+       (void)des_ecb_encrypt(t_input, t_output, key, 1);
 #ifdef DEBUG
        if (des_debug) {
-           des_debug_print("xor'ed",i,t_input[0],t_input[1]);
-           des_debug_print("cipher",i,t_output[0],t_output[1]);
+           des_debug_print("xor'ed", i, t_input[0], t_input[1]);
+           des_debug_print("cipher", i, t_output[0], t_output[1]);
        }
 #else
 #ifdef lint
@@ -130,8 +130,7 @@ afs_uint32 des_cbc_cksum(des_cblock *in, des_cblock *out,
     if ((afs_int32) output & 3) {
        memcpy((char *)output++, (char *)&t_output[0], sizeof(t_output[0]));
        memcpy((char *)output, (char *)&t_output[1], sizeof(t_output[1]));
-    }
-    else
+    } else
 #endif
     {
        *output++ = t_output[0];