X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Ftty-ask-password-agent%2Ftty-ask-password-agent.c;h=c0451c0fd0fabf3daf8faf73a4e7acd1b6b9303d;hb=30caf8f3afd29da8507c0edbcead7935604c9f3e;hp=6888a64d4d5443493e013997aac82b2f508db2b5;hpb=e8e581bf256b8c0fbd430935af79fa0e8ee570a1;p=elogind.git diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 6888a64d4..c0451c0fd 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -275,7 +275,7 @@ static int parse_password(const char *filename, char **wall) { return -errno; } - r = config_parse(NULL, filename, f, NULL, config_item_table_lookup, (void*) items, true, NULL); + r = config_parse(NULL, filename, f, NULL, config_item_table_lookup, (void*) items, true, false, NULL); if (r < 0) { log_error("Failed to parse password file %s: %s", filename, strerror(-r)); goto finish; @@ -666,7 +666,7 @@ static int parse_argv(int argc, char *argv[]) { { "wall", no_argument, NULL, ARG_WALL }, { "plymouth", no_argument, NULL, ARG_PLYMOUTH }, { "console", no_argument, NULL, ARG_CONSOLE }, - { NULL, 0, NULL, 0 } + {} }; int c; @@ -679,8 +679,7 @@ static int parse_argv(int argc, char *argv[]) { switch (c) { case 'h': - help(); - return 0; + return help(); case ARG_VERSION: puts(PACKAGE_STRING); @@ -715,8 +714,7 @@ static int parse_argv(int argc, char *argv[]) { return -EINVAL; default: - log_error("Unknown option code %c", c); - return -EINVAL; + assert_not_reached("Unhandled option"); } }