summaryrefslogtreecommitdiff
path: root/modules/dup2-tests
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-12-04 14:07:58 -0700
committerEric Blake <ebb9@byu.net>2009-12-07 06:24:44 -0700
commitb1ab442e6db76de2a7315531f6f0ec59c5934368 (patch)
tree7164daad2a15e91e921af360d790edfdf1fac24d /modules/dup2-tests
parent68145a074c0cdc9eff8364a62530da01a5f39bcd (diff)
downloadgnulib-b1ab442e6db76de2a7315531f6f0ec59c5934368.tar.gz
mgetgroups: reduce duplicate listings
POSIX doesn't guarantee whether the effective gid is included in the list of supplementary groups returned by getgroups. On the other hand, some platforms include the effective gid twice in the list. Meanwhile, mgetgroups can independently add a duplicate. Rather than spend a full-blown O(n log n) cleanup, we just remove the most common forms of duplicate groups with an O(n) pass. * lib/mgetgroups.c (mgetgroups): Reduce duplicates from the resulting array. * tests/test-chown.h (test_chown): Simplify client. * tests/test-lchown.h (test_lchown): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/dup2-tests')
0 files changed, 0 insertions, 0 deletions