glibc/resource/bug-ulimit1.c
Szabolcs Nagy b4174c28d2 Fix resource/bug-ulimit1 test
ulimit is a variadic function and the second argument must have type
long (or unsigned long).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2022-10-28 11:17:18 +01:00

22 lines
374 B
C

#include <ulimit.h>
#include <stdio.h>
int
main (void)
{
int retval = 0;
long int res;
res = ulimit (UL_SETFSIZE, 10000L);
printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
if (res != 10000)
retval = 1;
res = ulimit (UL_GETFSIZE);
printf ("Result of ulimit(UL_GETFSIZE): %ld\n", res);
if (res != 10000)
retval = 1;
return retval;
}