From 750731b250efe791a89da2d12ce98920c3b70fcb Mon Sep 17 00:00:00 2001 From: bapt Date: Mon, 1 Oct 2012 16:42:07 +0000 Subject: Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a number. This also allow pw user show to work as expected. PR: bin/172112 Submitted by: "Ilya A. Arkhipov" MFC after: 1 month --- usr.sbin/pw/pw_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.sbin/pw') diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index b59789c..fd3136c 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -314,8 +314,7 @@ pw_user(struct userconf * cnf, int mode, struct cargs * args) * know. */ if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val) - && atoi(a_name->val) > 0) { /* Assume uid */ + && strspn(a_name->val, "0123456789") == strlen(a_name->val)) { (a_uid = a_name)->ch = 'u'; a_name = NULL; } -- cgit v1.1