diff options
author | 2012-10-01 16:42:07 +0000 | |
---|---|---|
committer | 2012-10-01 16:42:07 +0000 | |
commit | 16a83217757124fac1897ac4703ecc8ad072cdd2 (patch) | |
tree | 2617290001afefada9ae2cf3eee39c7e7ef11617 /pw | |
parent | 834f33ee1bc423c3f81dc25c56e5f4cbdbf4b489 (diff) | |
download | pw-darwin-16a83217757124fac1897ac4703ecc8ad072cdd2.tar.gz pw-darwin-16a83217757124fac1897ac4703ecc8ad072cdd2.tar.zst pw-darwin-16a83217757124fac1897ac4703ecc8ad072cdd2.zip |
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" <rum1cro@yandex.ru>
MFC after: 1 month
Diffstat (limited to 'pw')
-rw-r--r-- | pw/pw_user.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c index b59789c..fd3136c 100644 --- a/pw/pw_user.c +++ b/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; } |