diff options
author | delphij <delphij@FreeBSD.org> | 2005-05-03 16:20:03 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-05-03 16:20:03 +0000 |
commit | 3f28784d7025984ac5eae44e8228054a47ccea5d (patch) | |
tree | d5aff05a7d9ab632a46ac8a80d3e6e5ef17c09d3 /lib | |
parent | b29f166ec1a926b9f182fb42c1f6ce4a48c1f2ff (diff) | |
download | FreeBSD-src-3f28784d7025984ac5eae44e8228054a47ccea5d.zip FreeBSD-src-3f28784d7025984ac5eae44e8228054a47ccea5d.tar.gz |
Cleanup for getgrouplist(3):
- Use /*- instead of /* for copyright section
- Include unistd.h for prototype of it
- Sort and separate includes as described in style(9)
- ANSIfy the function defination
- Use const for the traversing iterator
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/getgrouplist.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 40d55fc..63446cf 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -41,17 +41,15 @@ __FBSDID("$FreeBSD$"); * get credential */ #include <sys/types.h> -#include <string.h> + #include <grp.h> +#include <string.h> +#include <unistd.h> int -getgrouplist(uname, agroup, groups, grpcnt) - const char *uname; - gid_t agroup; - gid_t *groups; - int *grpcnt; +getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) { - struct group *grp; + const struct group *grp; int i, maxgroups, ngroups, ret; ret = 0; |