Mercurial > dovecot > core-2.2
changeset 3592:5434d427df49 HEAD
Compiler warning fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 18 Sep 2005 20:36:51 +0300 |
parents | 69f731759776 |
children | fa4cbca22d26 |
files | src/imap/imap-fetch-body.c src/imap/imap-search.c |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-fetch-body.c Sun Sep 18 20:31:41 2005 +0300 +++ b/src/imap/imap-fetch-body.c Sun Sep 18 20:36:51 2005 +0300 @@ -434,7 +434,7 @@ /* Find message_part for section (eg. 1.3.4) */ static int part_find(struct mail *mail, const struct imap_fetch_body_data *body, - const struct message_part **part_r, const char **section) + const struct message_part **part_r, const char **section_r) { const struct message_part *part; const char *path; @@ -446,11 +446,11 @@ path = body->section; while (*path >= '0' && *path <= '9' && part != NULL) { - /* get part number */ + /* get part number, we have already verified its validity */ num = 0; while (*path != '\0' && *path != '.') { - if (*path < '0' || *path > '9') - return FALSE; + i_assert(*path >= '0' && *path <= '9'); + num = num*10 + (*path - '0'); path++; } @@ -479,7 +479,7 @@ } *part_r = part; - *section = path; + *section_r = path; return 0; }
--- a/src/imap/imap-search.c Sun Sep 18 20:31:41 2005 +0300 +++ b/src/imap/imap-search.c Sun Sep 18 20:36:51 2005 +0300 @@ -266,7 +266,8 @@ break; if ((*args)->type != IMAP_ARG_ATOM || - strcasecmp(IMAP_ARG_STR(*args), "OR") != 0) + strcasecmp(IMAP_ARG_STR_NONULL(*args), + "OR") != 0) break; *args += 1;