From 1603d7ed5097d18d60275efa0e88a51b66d01118 Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 7 Sep 1989 14:10:43 +0000 Subject: [PATCH] make "none" delete a phone number --- clients/passwd/chfn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/passwd/chfn.c b/clients/passwd/chfn.c index f0e7aef9..8744a97f 100644 --- a/clients/passwd/chfn.c +++ b/clients/passwd/chfn.c @@ -291,13 +291,13 @@ char *ask(question, def_val, phone_num) } if (phone_num && ok) { - for (i = 0; i < strlen(buf); i++) { - if (!isdigit(buf[i]) && (buf[i] != '-')) { + for (i = 0; i < strlen(result); i++) { + if (!isdigit(result[i]) && (result[i] != '-')) { printf("Phone numbers can contain only digits.\n"); ok = FALSE; break; } - if (buf[i] == '-') + if (result[i] == '-') dashes = TRUE; } } -- 2.45.2