{ "no-tty", no_argument, NULL, ARG_NO_TTY },
{ "accept-cached", no_argument, NULL, ARG_ACCEPT_CACHED },
{ "multiple", no_argument, NULL, ARG_MULTIPLE },
- { NULL, 0, NULL, 0 }
+ {}
};
int c;
switch (c) {
case 'h':
- help();
- return 0;
+ return help();
case ARG_ICON:
arg_icon = optarg;
break;
case ARG_TIMEOUT:
- if (parse_usec(optarg, &arg_timeout) < 0) {
+ if (parse_sec(optarg, &arg_timeout) < 0) {
log_error("Failed to parse --timeout parameter %s", optarg);
return -EINVAL;
}
return -EINVAL;
default:
- log_error("Unknown option code %c", c);
- return -EINVAL;
+ assert_not_reached("Unhandled option");
}
}