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
This commit is contained in:
parent
d749d2ede4
commit
750731b250
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user