Menu

#90 sched_single.c:120: bad if test ?

v6.1.3
open
nobody
None
5
2015-09-21
2015-09-21
dcb
No

sched_single.c:120:16: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]

if (prio < 0 && prio >= MAX_PRIORITY)

Maybe

if (prio < 0 || prio >= MAX_PRIORITY)

Discussion


Log in to post a comment.