summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-05-05 09:37:05 +0200
committerMarcel Raad <raad@teamviewer.com>2017-05-08 09:19:18 +0200
commite2b394106d543c4615a60795b7fdce04bd4e5090 (patch)
tree9232b5504a261315312cc8998f947368c9a355f0 /tests
parentd99acd937a01ee7111c347e08c1f25cea54a6ab9 (diff)
downloadcurl-e2b394106d543c4615a60795b7fdce04bd4e5090.tar.gz
test537: use correct variable type
Avoids narrowing conversion warnings because rlim_t is usually unsigned long. Closes https://github.com/curl/curl/pull/1469
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib537.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c
index 6d7c3e40f..cfa1179d7 100644
--- a/tests/libtest/lib537.c
+++ b/tests/libtest/lib537.c
@@ -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);