diff options
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/addgroup.c | 2 | ||||
-rw-r--r-- | loginutils/chpasswd.c | 2 | ||||
-rw-r--r-- | loginutils/cryptpw.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c index 367c6b9..c9495b2 100644 --- a/loginutils/addgroup.c +++ b/loginutils/addgroup.c @@ -83,7 +83,7 @@ static void add_user_to_group(char **args, if (!group_file) return; - while ((line = xmalloc_getline(group_file))) { + while ((line = xmalloc_fgetline(group_file)) != NULL) { /* Find the group */ if (!strncmp(line, args[1], len) && line[len] == ':' diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index cb13ebb..5dc7a9b 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c @@ -33,7 +33,7 @@ int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv) USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;) opt = getopt32(argv, "em"); - while ((name = xmalloc_getline(stdin)) != NULL) { + while ((name = xmalloc_fgetline(stdin)) != NULL) { pass = strchr(name, ':'); if (!pass) bb_error_msg_and_die("missing new password"); diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c index c5170c6..68f5e80 100644 --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c @@ -22,7 +22,7 @@ int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv) crypt_make_salt(salt, 1, 0); /* des */ } - puts(pw_encrypt(argv[optind] ? argv[optind] : xmalloc_getline(stdin), salt)); + puts(pw_encrypt(argv[optind] ? argv[optind] : xmalloc_fgetline(stdin), salt)); return 0; } |