]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
if2ip: make the buf_size arg a size_t
authorDaniel Stenberg <daniel@haxx.se>
Tue, 30 Apr 2024 07:11:00 +0000 (09:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 30 Apr 2024 12:22:11 +0000 (14:22 +0200)
sizes should be size_t

Ref: #13489
Closes #13505

lib/if2ip.c
lib/if2ip.h

index 36dfe8b396a5860de91b1284680446486b2d76ab..42e14500bc996837249c9d30015d34c26281511c 100644 (file)
@@ -102,7 +102,7 @@ if2ip_result_t Curl_if2ip(int af,
                           unsigned int local_scope_id,
 #endif
                           const char *interf,
-                          char *buf, int buf_size)
+                          char *buf, size_t buf_size)
 {
   struct ifaddrs *iface, *head;
   if2ip_result_t res = IF2IP_NOT_FOUND;
@@ -187,7 +187,7 @@ if2ip_result_t Curl_if2ip(int af,
                           unsigned int local_scope_id,
 #endif
                           const char *interf,
-                          char *buf, int buf_size)
+                          char *buf, size_t buf_size)
 {
   struct ifreq req;
   struct in_addr in;
@@ -242,7 +242,7 @@ if2ip_result_t Curl_if2ip(int af,
                           unsigned int local_scope_id,
 #endif
                           const char *interf,
-                          char *buf, int buf_size)
+                          char *buf, size_t buf_size)
 {
     (void) af;
 #ifdef USE_IPV6
index e251d1ddfc88db8faf608ad05a1db2381cd6931a..f4b2f4c15d97a19a23faea362af594a284a834df 100644 (file)
@@ -50,7 +50,7 @@ if2ip_result_t Curl_if2ip(int af,
                           unsigned int local_scope_id,
 #endif
                           const char *interf,
-                          char *buf, int buf_size);
+                          char *buf, size_t buf_size);
 
 #ifdef __INTERIX