Reorganise, make it just one function, remove -v option it didnt work properly anyway...
[oweals/busybox.git] / coreutils / md5sum.c
index bb4d115ca0d3308bc6187897effc0a883ba7c1af..f5be4486cddca551086f7da855f2fd0653677244 100644 (file)
@@ -434,7 +434,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
                temp += FI(B,C,D);
        }
        temp += cwp[(int)(*pp++)] + *pc++;
-       temp = CYCLIC (temp, ps[i&3]);
+       CYCLIC (temp, ps[i&3]);
        temp += B;
        A = D; D = C; C = B; B = temp;
     }
@@ -443,7 +443,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
 
     for ( i = 0 ; i < 16 ; i++ ) {
        temp = A + FF(B,C,D) + cwp[(int)(*pp++)] + *pc++;
-       temp = CYCLIC (temp, ps[i&3]);
+       CYCLIC (temp, ps[i&3]);
        temp += B;
        A = D; D = C; C = B; B = temp;
     }
@@ -451,21 +451,21 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
     ps += 4;
     for ( i = 0 ; i < 16 ; i++ ) {
        temp = A + FG(B,C,D) + cwp[(int)(*pp++)] + *pc++;
-       temp = CYCLIC (temp, ps[i&3]);
+       CYCLIC (temp, ps[i&3]);
        temp += B;
        A = D; D = C; C = B; B = temp;
     }
     ps += 4;
     for ( i = 0 ; i < 16 ; i++ ) {
        temp = A + FH(B,C,D) + cwp[(int)(*pp++)] + *pc++;
-       temp = CYCLIC (temp, ps[i&3]);
+       CYCLIC (temp, ps[i&3]);
        temp += B;
        A = D; D = C; C = B; B = temp;
     }
     ps += 4;
     for ( i = 0 ; i < 16 ; i++ ) {
        temp = A + FI(B,C,D) + cwp[(int)(*pp++)] + *pc++;
-       temp = CYCLIC (temp, ps[i&3]);
+       CYCLIC (temp, ps[i&3]);
        temp += B;
        A = D; D = C; C = B; B = temp;
     }
@@ -699,12 +699,12 @@ static int split_3(char *s,
 
   s[i++] = '\0';
 
-  if (s[i] != ' ' && s[i++] != '*')
+  if (s[i] != ' ' && s[i] != '*')
     return FALSE;
 
   /* All characters between the type indicator and end of line are
      significant -- that includes leading and trailing white space.  */
-  *w = &s[i];
+  *w = &s[++i];
 
   if (escaped_filename) {
     /* Translate each `\n' string in the file name to a NEWLINE,