From bc18c184e56ff9aa6b092b01116b46cea4f34492 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Thu, 22 Dec 2022 17:54:51 -0600 Subject: [PATCH] chfn: new_fields: fix wrong fields printed When the caller may not change the room number, work phone, or home number, then rather than prompting for the new one it will print the existing one. But due to a typo it printed the full name in place of each of those. Fix the fields being printed. Signed-off-by: Serge Hallyn --- src/chfn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chfn.c b/src/chfn.c index 1c2f1cce..b1793e18 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -175,19 +175,19 @@ static void new_fields (void) if (may_change_field ('r')) { change_field (roomno, sizeof roomno, _("Room Number")); } else { - printf (_("\t%s: %s\n"), _("Room Number"), fullnm); + printf (_("\t%s: %s\n"), _("Room Number"), roomno); } if (may_change_field ('w')) { change_field (workph, sizeof workph, _("Work Phone")); } else { - printf (_("\t%s: %s\n"), _("Work Phone"), fullnm); + printf (_("\t%s: %s\n"), _("Work Phone"), workph); } if (may_change_field ('h')) { change_field (homeph, sizeof homeph, _("Home Phone")); } else { - printf (_("\t%s: %s\n"), _("Home Phone"), fullnm); + printf (_("\t%s: %s\n"), _("Home Phone"), homeph); } if (amroot) {