staging: keucr: Use memcpy() instead custom StringCopy() and some style cleanups
authorJavier Martinez Canillas <martinez.javier@gmail.com>
Sun, 2 Jan 2011 22:14:27 +0000 (23:14 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 21 Jan 2011 20:16:52 +0000 (12:16 -0800)
staging: keucr: Use memcpy() instead custom StringCopy() and some style cleanups

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Al Cho <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/keucr/smilecc.c

index daf322ac9bf98af0db804b778913eee02e297312..5659dea7b701fb8c5867ac9fb1cbb6cc00cd4be3 100644 (file)
@@ -182,13 +182,17 @@ BYTE *buf;
 BYTE *redundant_ecc;
 BYTE *calculate_ecc;
 {
-    DWORD err;
+       DWORD err;
 
-    err=correct_data(buf,redundant_ecc,*(calculate_ecc+1),*(calculate_ecc),*(calculate_ecc+2));
-    if (err==1) StringCopy(calculate_ecc,redundant_ecc,3);
-        if (err==0 || err==1 || err==2)
-            return(0);
-    return(-1);
+       err = correct_data(buf, redundant_ecc, *(calculate_ecc + 1),
+                          *(calculate_ecc), *(calculate_ecc + 2));
+       if (err == 1)
+               memcpy(calculate_ecc, redundant_ecc, 3);
+
+       if (err == 0 || err == 1 || err == 2)
+               return 0;
+
+       return -1;
 }
 
 void _Calculate_D_SwECC(buf,ecc)