-/* $OpenBSD: quota.c,v 1.33 2015/01/16 06:40:10 deraadt Exp $ */
+/* $OpenBSD: quota.c,v 1.34 2015/01/17 17:22:07 deraadt Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
/*
* Disk quota reporting program.
*/
-#include <sys/param.h> /* DEV_BSIZE */
+#include <sys/param.h> /* DEV_BSIZE dbtob */
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
main(int argc, char *argv[])
{
int ngroups;
- gid_t mygid, gidset[NGROUPS];
+ gid_t mygid, gidset[NGROUPS_MAX];
int i, gflag = 0, uflag = 0;
int ch;
extern char *optarg;
showuid(getuid());
if (gflag) {
mygid = getgid();
- ngroups = getgroups(NGROUPS, gidset);
+ ngroups = getgroups(NGROUPS_MAX, gidset);
if (ngroups < 0)
err(1, "getgroups");
showgid(mygid);
{
struct group *grp = getgrgid(gid);
int ngroups;
- gid_t mygid, gidset[NGROUPS];
+ gid_t mygid, gidset[NGROUPS_MAX];
int i;
const char *name;
else
name = grp->gr_name;
mygid = getgid();
- ngroups = getgroups(NGROUPS, gidset);
+ ngroups = getgroups(NGROUPS_MAX, gidset);
if (ngroups < 0) {
warn("getgroups");
return;
{
struct group *grp = getgrnam(name);
int ngroups;
- gid_t mygid, gidset[NGROUPS];
+ gid_t mygid, gidset[NGROUPS_MAX];
int i;
if (grp == NULL) {
return;
}
mygid = getgid();
- ngroups = getgroups(NGROUPS, gidset);
+ ngroups = getgroups(NGROUPS_MAX, gidset);
if (ngroups < 0) {
warn("getgroups");
return;