Permalink
Browse files
tracelib.c: Removed unnecessary condition in if
if ((kev.flags & EV_ERROR) == 0 || ((kev.flags & EV_ERROR) > 0 && kev.data != 0)) If compilers find first operand true while evaluating || , the second operand isn’t checked. So the second operand is only checked if (kev.flags & EV_ERROR) != 0. So (kev.flags & EV_ERROR) > 0 it doesn’t need to be checked in conjunction with kev.data != 0. It doesn’t return negative as its of type uint16_t.
- Loading branch information