summaryrefslogtreecommitdiffstats
path: root/buffy.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-08-06 21:52:53 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-08-06 21:52:53 +0200
commitea543325f5e0c05d7aacd764b2bef5a241a85794 (patch)
tree5d7745c97d132d3f0d6b18468ba0762f8ff83f7f /buffy.c
parent798902828bf76c059ee43f189b1469a0328a8cc7 (diff)
Fix comparison signedness warnings.
Diffstat (limited to 'buffy.c')
-rw-r--r--buffy.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/buffy.c b/buffy.c
index 614bf115..eb9ad540 100644
--- 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)