mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't call setgrent() in an unportable way.
For FreeBSD 12, I'm considering updating setgrent() to have a function prototype that conforms to POSIX. FreeBSD seems to be the only operating system that lets setgrent() return an integer. It's also inconsistent with setpwent(). It looks like our libcasper depends on setgrent() returning an integer. Get rid of that. Reviewed by: oshogbo Differential Revision: https://reviews.freebsd.org/D6659
This commit is contained in:
parent
ea580d0b45
commit
2ca9ffa9bb
1 changed files with 3 additions and 1 deletions
|
|
@ -703,7 +703,9 @@ grp_setgrent(const nvlist_t *limits __unused, const nvlist_t *nvlin __unused,
|
|||
nvlist_t *nvlout __unused)
|
||||
{
|
||||
|
||||
return (setgrent() == 0 ? EFAULT : 0);
|
||||
setgrent();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue