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:
Baptiste Daroussin 2012-10-01 16:42:07 +00:00
parent 79823ad281
commit e6e9c14bdf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241107

View File

@ -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;
}