Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- login-utils/islocal.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/login-utils/islocal.c b/login-utils/islocal.c index 13ce28e..7c4e775 100644 --- a/login-utils/islocal.c +++ b/login-utils/islocal.c @@ -82,13 +82,10 @@ static int is_local_in_file(const char *user, const char *filename) int is_local(const char *user) { int rv; - if ((rv = is_local_in_file(user, _PATH_PASSWD)) < 0) { - perror(_PATH_PASSWD); - fprintf(stderr, _("cannot open %s"), _PATH_PASSWD); - exit(1); - } else { - return rv; - } + + if ((rv = is_local_in_file(user, _PATH_PASSWD)) < 0) + err(EXIT_FAILURE, _("cannot open %s"), _PATH_PASSWD); + return rv; } #ifdef TEST_PROGRAM -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html