Skip to content

Commit

Permalink
staging: keucr: Use memcpy() instead custom StringCopy() and some sty…
Browse files Browse the repository at this point in the history
…le 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>
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Jan 21, 2011
1 parent 1b5b4e1 commit f3d5049
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions drivers/staging/keucr/smilecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3d5049

Please sign in to comment.