struct passwd pwd;
struct passwd* pp;
char buf[8192];
- int rc;
errno = 0;
pp = NULL;
- if ((rc = getpwnam_r(name, &pwd, buf, sizeof(buf), &pp)) == 0 && pp != NULL) {
+ if (getpwnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != NULL) {
return pp->pw_uid;
}
struct group pwd;
struct group* pp;
char buf[8192];
- int rc;
errno = 0;
pp = NULL;
- if ((rc = getgrnam_r(name, &pwd, buf, sizeof(buf), &pp)) == 0 && pp != NULL) {
+ if (getgrnam_r(name, &pwd, buf, sizeof(buf), &pp) == 0 && pp != NULL) {
return pp->gr_gid;
}