|
if (strcmp(val, "1") == 0 || strcasecmp(val, "on") == 0 || strcasecmp(val, "yes") == 0 || strcasecmp(val, "true")) |
all the strcasecmp() are correctly comparing against == 0, except for true.
- Because
strcasecmp returns non-zero on mismatch, the condition evaluates to true for any string other than "true" (such as "0", "false", or "off"), and evaluates to false when the value is exactly "true".
- This inverses the intended boot configuration behavior for
blog.silent and blog.coldboot.
showconsole/blogd.c
Line 292 in 2cfe9f3
all the strcasecmp() are correctly comparing against
== 0, except fortrue.strcasecmpreturns non-zero on mismatch, the condition evaluates to true for any string other than "true" (such as "0", "false", or "off"), and evaluates to false when the value is exactly "true".blog.silentandblog.coldboot.