summaryrefslogtreecommitdiff
path: root/drivers/staging/keucr
diff options
context:
space:
mode:
authorJavier Martinez Canillas <martinez.javier@gmail.com>2011-01-02 23:14:27 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-01-21 12:16:52 -0800
commitf3d5049ccdb57d14712f7cba27b0dd0a860961d7 (patch)
tree14b652799431c4e7f2efe6ba860508da191bac36 /drivers/staging/keucr
parent1b5b4e17e58a0c8ddfd5ad60e65f924fb00b60ef (diff)
staging: keucr: Use memcpy() instead custom StringCopy() and some style cleanups
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>
Diffstat (limited to 'drivers/staging/keucr')
-rw-r--r--drivers/staging/keucr/smilecc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/staging/keucr/smilecc.c b/drivers/staging/keucr/smilecc.c
index daf322ac9bf9..5659dea7b701 100644
--- a/drivers/staging/keucr/smilecc.c
+++ b/drivers/staging/keucr/smilecc.c
@@ -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)