tree-wide: fix return type of sysconf()

This commit is contained in:
Lennart Poettering
2026-07-01 16:14:20 +02:00
parent 818b3b31e6
commit 7f9b1da527
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -922,7 +922,7 @@ static int get_supplementary_groups(
* be positive, otherwise fail.
*/
errno = 0;
int ngroups_max = (int) sysconf(_SC_NGROUPS_MAX);
long ngroups_max = sysconf(_SC_NGROUPS_MAX);
if (ngroups_max <= 0)
return errno_or_else(EOPNOTSUPP);
+2 -1
View File
@@ -1037,7 +1037,8 @@ TEST(condition_test_group) {
Condition *condition;
char gid[DECIMAL_STR_MAX(uint32_t)];
gid_t *gids, max_gid;
int ngroups_max, ngroups, r, i;
int ngroups, r, i;
long ngroups_max;
xsprintf(gid, "%u", UINT32_C(0xFFFF));
ASSERT_NOT_NULL((condition = condition_new(CONDITION_GROUP, gid, false, false)));