Skip to content
Snippets Groups Projects
Commit c2af6b49 authored by Sebastien Ponce's avatar Sebastien Ponce Committed by Steven Murray
Browse files

Fixed setting of serrno (it was set to EINTERNAL even when no error occured)

parent 966fb517
Branches
Tags
No related merge requests found
......@@ -44,7 +44,9 @@ const char *name;
}
errno = 0;
rc = getgrnam_r(name,grp,grpbuf,grpbuflen,&result);
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
if (rc != 0) {
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
}
return(result);
}
......@@ -73,7 +75,9 @@ gid_t gid;
}
errno = 0;
rc = getgrgid_r(gid,grp,grpbuf,grpbuflen,&result);
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
if (rc != 0) {
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
}
return(result);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment