]> granicus.if.org Git - neomutt/commitdiff
Fix comparison signedness warnings.
authorMatthias Andree <matthias.andree@gmx.de>
Fri, 6 Aug 2010 19:52:53 +0000 (21:52 +0200)
committerMatthias Andree <matthias.andree@gmx.de>
Fri, 6 Aug 2010 19:52:53 +0000 (21:52 +0200)
buffy.c

diff --git a/buffy.c b/buffy.c
index 614bf11505cebd168e4b10c71f498b8c4eeee1a6..eb9ad5403a3608041897e41443d2cf2d6327d106 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -456,13 +456,11 @@ int mutt_buffy_list (void)
   BUFFY *tmp;
   char path[_POSIX_PATH_MAX];
   char buffylist[2*STRING];
-  int pos;
-  int first;
+  size_t pos = 0;
+  int first = 1;
 
   int have_unnotified = BuffyNotify;
   
-  pos = 0;
-  first = 1;
   buffylist[0] = 0;
   pos += strlen (strncat (buffylist, _("New mail in "), sizeof (buffylist) - 1 - pos)); /* __STRNCAT_CHECKED__ */
   for (tmp = Incoming; tmp; tmp = tmp->next)
@@ -474,7 +472,7 @@ int mutt_buffy_list (void)
     strfcpy (path, tmp->path, sizeof (path));
     mutt_pretty_mailbox (path, sizeof (path));
     
-    if (!first && pos + strlen (path) >= COLS - 7)
+    if (!first && (COLS - 7 >= 0) && (pos + strlen (path) >= (size_t)COLS - 7))
       break;
     
     if (!first)