cw.c: simplify some code by using logical negation instead of ternary operator.