#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#define ASSERT(expr) \
do \
main (int argc, char **argv _UNUSED_PARAMETER_)
{
int result;
- GETGROUPS_T *groups;
+ gid_t *groups;
errno = 0;
result = getgroups (0, NULL);
}
ASSERT (0 <= result);
ASSERT (result + 1 < SIZE_MAX / sizeof *groups);
- groups = malloc (result + 1 * sizeof *groups);
+ groups = malloc ((result + 1) * sizeof *groups);
ASSERT (groups);
groups[result] = -1;
/* Check for EINVAL handling. Not all processes have supplemental