Cyan4973 / FiniteStateEntropy

New generation entropy codecs : Finite State Entropy and Huff0
BSD 2-Clause "Simplified" License
1.33k stars 143 forks source link

[lib/entropy_common] remove checking on error. Change '&' to '&&' at the while loop condition. #117

Open TheVice opened 7 months ago

TheVice commented 7 months ago

Hello.

While reading source code at the repository I detected that, checking at the FSE_readNCount function of lib/entropy_common.c file on error is not necessary - from the outside of function at least. Because same result will be returned, unless corruption of the data was detected. Probably possibility to set brake point on that line or addition output from the error function will be the reason to left such checking.

Latter in this function at the while loop condition - placed bit operation instead of checking on logical AND. Proposed to replaced with the last one.

Thank you.