Can't actually happen because the string doesn't change and the
result is already checked above. However, it's pretty harmless to
add.
if (s == 0) {
ifo->script = NULL;
break;
- } else if (s == -1) {
- logerr("%s: script", __func__);
- return -1;
}
dl = (size_t)s;
if (s == -1 || (ifo->script = malloc(dl)) == NULL) {
logerr(__func__);
return -1;
}
- parse_str(ifo->script, dl, arg, PARSE_STRING_NULL);
- if (ifo->script[0] == '\0' ||
+ s = parse_str(ifo->script, dl, arg, PARSE_STRING_NULL);
+ if (s == -1 ||
+ ifo->script[0] == '\0' ||
strcmp(ifo->script, "/dev/null") == 0)
{
free(ifo->script);