errno = 0;
id = strtol(argv[1], &name, 10);
- if (id == 0 && errno == 0) {
+ if (id == 0 && (errno == 0 || errno == EINVAL)) {
ret = del_output(UINT32_MAX, name);
} else if (errno == 0 && *name == '\0') {
ret = del_output(id, NULL);
free(session_name);
}
- /* Overwrite ret if an error occured during handle_command */
+ /* Overwrite ret if an error occurred during handle_command */
ret = command_ret ? command_ret : ret;
poptFreeContext(pc);
return ret;