Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d5049c authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Greg Kroah-Hartman
Browse files

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: default avatarJavier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Cc: Al Cho <acho@novell.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1b5b4e17
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -184,11 +184,15 @@ 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);
	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);
		return 0;

	return -1;
}

void _Calculate_D_SwECC(buf,ecc)