sudoers plugin: silence most -Wconversion warnings.
This commit is contained in:
@@ -360,7 +360,7 @@ testsudoers_getgrouplist2(const char *name, GETGROUPS_T basegid,
|
||||
grpsize = sysconf(_SC_NGROUPS_MAX);
|
||||
if (grpsize < 0)
|
||||
grpsize = NGROUPS_MAX;
|
||||
groups = reallocarray(NULL, grpsize, 4 * sizeof(*groups));
|
||||
groups = reallocarray(NULL, (size_t)grpsize, 4 * sizeof(*groups));
|
||||
if (groups == NULL)
|
||||
return -1;
|
||||
grpsize <<= 2;
|
||||
@@ -398,7 +398,7 @@ testsudoers_getgrouplist2(const char *name, GETGROUPS_T basegid,
|
||||
/* Static group vector. */
|
||||
goto done;
|
||||
}
|
||||
tmp = reallocarray(groups, grpsize, 2 * sizeof(*groups));
|
||||
tmp = reallocarray(groups, (size_t)grpsize, 2 * sizeof(*groups));
|
||||
if (tmp == NULL) {
|
||||
free(groups);
|
||||
groups = NULL;
|
||||
|
Reference in New Issue
Block a user