On Fri, Dec 31, 2010 at 8:28 PM, Javier Martinez Canillas <martinez.javier@xxxxxxxxx> wrote: > > Signed-off-by: Javier Martinez Canillas <martinez.javier@xxxxxxxxx> > --- > drivers/staging/keucr/smilecc.c | 16 +++++++++------- > 1 files changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/staging/keucr/smilecc.c b/drivers/staging/keucr/smilecc.c > index daf322a..f9e515d 100644 > --- a/drivers/staging/keucr/smilecc.c > +++ b/drivers/staging/keucr/smilecc.c > @@ -182,13 +182,15 @@ BYTE *buf; > BYTE *redundant_ecc; > BYTE *calculate_ecc; > { > - 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); > + DWORD err; > + err = correct_data(buf, redundant_ecc, *(calculate_ecc+1), > + *(calculate_ecc), *(calculate_ecc+2)); Any reason why you didn't unify these 2 lines? Like this: DWORD err = correct_data(...); > + 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) > -- > 1.7.0.4 > > _______________________________________________ > devel mailing list > devel@xxxxxxxxxxxxxxxxxxxxxx > http://driverdev.linuxdriverproject.org/mailman/listinfo/devel > -- Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-) _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel