Re: [PATCH 1/3] staging: keucr: Use memcmp() instead custom StringCmp() and some style cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> Âint Check_D_ReadError(BYTE *redundant)
>> Â{
>> - Â Â// Driver ä ECC Check
>> - Â Âreturn(SUCCESS);
>> - Â Âif (!StringCmp((char *)(redundant+0x0D),(char *)EccBuf,3))
>> - Â Â Â Âif (!StringCmp((char *)(redundant+0x08),(char *)(EccBuf+0x03),3))
>> - Â Â Â Â Â Âreturn(SUCCESS);
>> + Â Â /* Driver ECC Check */
>> + Â Â if (memcmp(redundant + 0x0D, EccBuf, 3) ||
>> + Â Â Â Â memcmp(redundant + 0x08, EccBuf + 0x03, 3))
>> + Â Â Â Â Â Â return ERROR;
>>
>> - Â Âreturn(ERROR);
>> + Â Â return SUCCESS;
>> Â}
>
> This code isn't the same.
>
> Before, the return was always SUCCESS and the code
> after the first return was ignored.
>
> You deleted that return and now you do the driver ECC check.
> Is that correct?
>

You are right Joe, sorry for that. Should I remove the dead code after
the return SUCCESS or keep it?

-- 
Best regards,

-----------------------------------------
Javier MartÃnez Canillas
(+34) 682 39 81 69
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux