<<< Date Index >>>     <<< Thread Index >>>

[PATCH 9 of 9] Fix comparison signedness warnings



# HG changeset patch
# User Matthias Andree <matthias.andree@xxxxxx>
# Date 1281124898 -7200
# Branch HEAD
# Node ID 8bf3c2dac4545c2bfcdd411806c1f2b2442ac035
# Parent  55667d213995788784043ab889d8ac1995fd2b37
Fix comparison signedness warnings.

diff --git a/url.c b/url.c
--- a/url.c
+++ b/url.c
@@ -81,7 +81,7 @@
 
   if (!s || !(t = strchr (s, ':')))
     return U_UNKNOWN;
-  if ((t - s) + 1 >= sizeof (sbuf))
+  if ((size_t)(t - s) >= sizeof (sbuf) - 1)
     return U_UNKNOWN;
 
   strfcpy (sbuf, s, t - s + 1);
@@ -251,7 +251,8 @@
   char *tag, *value;
   char scratch[HUGE_STRING];
 
-  int taglen, rc = -1;
+  size_t taglen;
+  int rc = -1;
 
   LIST *last = NULL;