return 0;
}
- if (isdigit_c(gid[0])) {
+ if (!streq(gid, "") && strisdigit_c(gid)) {
/*
* The GID is a number, which means either this is a brand
* new group, or an existing group.
/*
* Now I have all of the fields required to create the new group.
*/
- if (!streq(gid, "") && (!isdigit_c(gid[0]))) {
+ if (!streq(gid, "") && !strisdigit_c(gid)) {
grent.gr_name = xstrdup (gid);
} else {
grent.gr_name = xstrdup (name);
* The first guess for the UID is either the numerical UID that the
* caller provided, or the next available UID.
*/
- if (isdigit_c(uid[0])) {
+ if (!streq(uid, "") && strisdigit_c(uid)) {
if ((get_uid(uid, nuid) == -1) || (*nuid == (uid_t)-1)) {
fprintf (stderr,
_("%s: invalid user ID '%s'\n"),