diff options
| author | Mike Tancsa <mike@sentex.net> | 2017-03-31 17:50:35 -0300 |
|---|---|---|
| committer | Quentin Young <qlyoung@users.noreply.github.com> | 2017-04-01 00:50:40 -0400 |
| commit | 7e5b53972233b6aea593397ed8fb8f55068eadaf (patch) | |
| tree | a7caf57de08ad3f3dc0735c423905b0ae134112e /lib/openbsd-queue.h | |
| parent | 98b506c210fc9b8a1336ab36359ca79826a3f785 (diff) | |
lib: fix usage of getgrouplist() in *BSD
On BSD systems, the getgrouplist() function returns 0 if successful and
-1 on error.
Linux in the other hand returns *ngroups (the number of groups of which
user is a member) on success and -1 on error.
Given this difference, the most portable way to use getgrouplist()
is use its return value only for checking if it succeeded or not.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/openbsd-queue.h')
0 files changed, 0 insertions, 0 deletions
