From: Javier Martinez Canillas Date: Sun, 2 Jan 2011 22:14:27 +0000 (+0100) Subject: staging: keucr: Use memcpy() instead custom StringCopy() and some style cleanups X-Git-Tag: MMI-PSA29.97-13-9~20521^2~852 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3d5049ccdb57d14712f7cba27b0dd0a860961d7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Dan Carpenter Reviewed-by: Marcin Slusarz Cc: Al Cho Signed-off-by: Greg Kroah-Hartman --- 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)