]> granicus.if.org Git - curl/commitdiff
rand: pass in number of randoms as an unsigned argument
authorDaniel Stenberg <daniel@haxx.se>
Mon, 21 Nov 2016 06:51:42 +0000 (07:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 Nov 2016 06:51:42 +0000 (07:51 +0100)
lib/rand.c
lib/rand.h

index 342796513f88282962189eb198fbe45a9e1708c1..0e716a77c3a721ede40d603f681a52c93d6252fc 100644 (file)
@@ -113,10 +113,11 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd)
  *
  */
 
-CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rndptr, int num)
+CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rndptr,
+                   unsigned int num)
 {
   CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
-  int i;
+  unsigned int i;
 
   assert(num > 0);
 
index 36f89b526c00cbc98cd8de70fd835308eace0efb..0f8986120efa5d481c85c1a38ad17d0bab2cb38b 100644 (file)
@@ -37,6 +37,7 @@
  * easy handle!
  *
  */
-CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd, int num);
+CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd,
+                   unsigned int num);
 
 #endif /* HEADER_CURL_RAND_H */