gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 108/254: test537: use correct variable type


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 108/254: test537: use correct variable type
Date: Sat, 17 Jun 2017 16:52:20 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit e2b394106d543c4615a60795b7fdce04bd4e5090
Author: Marcel Raad <address@hidden>
AuthorDate: Fri May 5 09:37:05 2017 +0200

    test537: use correct variable type
    
    Avoids narrowing conversion warnings because rlim_t is usually
    unsigned long.
    
    Closes https://github.com/curl/curl/pull/1469
---
 tests/libtest/lib537.c | 4 ++--
 1 file 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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]