diff options
Diffstat (limited to 'login-utils/vipw.c')
-rw-r--r-- | login-utils/vipw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/login-utils/vipw.c b/login-utils/vipw.c index 2e343b6ea..d12ea7316 100644 --- a/login-utils/vipw.c +++ b/login-utils/vipw.c @@ -354,10 +354,9 @@ int main(int argc, char *argv[]) * which means they can be translated. */ printf(_("Would you like to edit %s now [y/n]? "), orig_file); - if (fgets(response, sizeof(response), stdin)) { - if (rpmatch(response) == RPMATCH_YES) - edit_file(1); - } + if (fgets(response, sizeof(response), stdin) && + rpmatch(response) == RPMATCH_YES) + edit_file(1); } exit(EXIT_SUCCESS); } |