[dovecot-cvs] dovecot/src/imap imap-fetch-body.c, 1.24,
1.25 imap-search.c, 1.13, 1.14
cras at dovecot.org
cras at dovecot.org
Sun Sep 18 20:36:53 EEST 2005
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv3940
Modified Files:
imap-fetch-body.c imap-search.c
Log Message:
Compiler warning fixes
Index: imap-fetch-body.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch-body.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- imap-fetch-body.c 12 Jul 2005 20:45:59 -0000 1.24
+++ imap-fetch-body.c 18 Sep 2005 17:36:51 -0000 1.25
@@ -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;
}
Index: imap-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-search.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- imap-search.c 29 Jul 2005 08:43:04 -0000 1.13
+++ imap-search.c 18 Sep 2005 17:36:51 -0000 1.14
@@ -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;
More information about the dovecot-cvs
mailing list