1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

test537: use correct variable type

Avoids narrowing conversion warnings because rlim_t is usually
unsigned long.

Closes https://github.com/curl/curl/pull/1469
This commit is contained in:
Marcel Raad 2017-05-05 09:37:05 +02:00
parent d99acd937a
commit e2b394106d
No known key found for this signature in database
GPG Key ID: B7F13D981BBF1607

View File

@ -103,7 +103,7 @@ static int fopen_works(void)
static int rlimit(int keep_open)
{
int *tmpfd;
int nitems, i;
rlim_t nitems, i;
int *memchunk = NULL;
char *fmt;
struct rlimit rl;
@ -232,7 +232,7 @@ static int rlimit(int keep_open)
if(nitems > 0x7fff)
nitems = 0x40000;
do {
num_open.rlim_max = sizeof(*memchunk) * (size_t)nitems;
num_open.rlim_max = sizeof(*memchunk) * nitems;
snprintf(strbuff, sizeof(strbuff), fmt, num_open.rlim_max);
fprintf(stderr, "allocating memchunk %s byte array\n", strbuff);
memchunk = malloc(sizeof(*memchunk) * (size_t)nitems);