}
if (probenum < 1 || probenum > max_probes) {
- sr_err("strutil: Invalid probe (%d).\n", probenum);
+ sr_err("strutil: Invalid probe (%d).", probenum);
error = TRUE;
break;
}
for (tc = ++trigger; *tc; tc++) {
if (strchr(trigger_types, *tc) == NULL) {
sr_err("strutil: Unsupported trigger "
- "type '%c'.\n", *tc);
+ "type '%c'.", *tc);
error = TRUE;
break;
}
if (!boolstr)
return FALSE;
- if (!g_strcasecmp(boolstr, "true") ||
- !g_strcasecmp(boolstr, "yes") ||
- !g_strcasecmp(boolstr, "on") ||
- !g_strcasecmp(boolstr, "1"))
+ if (!g_ascii_strncasecmp(boolstr, "true", 4) ||
+ !g_ascii_strncasecmp(boolstr, "yes", 3) ||
+ !g_ascii_strncasecmp(boolstr, "on", 2) ||
+ !g_ascii_strncasecmp(boolstr, "1", 1))
return TRUE;
return FALSE;