diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-08-06 21:52:53 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-08-06 21:52:53 +0200 |
commit | ea543325f5e0c05d7aacd764b2bef5a241a85794 (patch) | |
tree | 5d7745c97d132d3f0d6b18468ba0762f8ff83f7f | |
parent | 798902828bf76c059ee43f189b1469a0328a8cc7 (diff) |
Fix comparison signedness warnings.
-rw-r--r-- | buffy.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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) |