diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-01 16:42:07 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-10-01 16:42:07 +0000 |
| commit | c2c30eaaf772878f8a3726c3f92da270a9ac9f20 (patch) | |
| tree | f8e33a6f20d0c5b2262ee40a778d928baa7537a1 /pw/pw_user.c | |
| parent | 63f083cb277855407abf651b0833c768c56f4d0d (diff) | |
| download | pw-darwin-c2c30eaaf772878f8a3726c3f92da270a9ac9f20.tar.gz pw-darwin-c2c30eaaf772878f8a3726c3f92da270a9ac9f20.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/pw_user.c')
| -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; } |
