dovecot-2.2: lib-storage: functions returning bool actually retu...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 27 18:19:08 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/973b67dda572
changeset: 17392:973b67dda572
user:      Phil Carmody <phil at dovecot.fi>
date:      Tue May 27 21:17:34 2014 +0300
description:
lib-storage: functions returning bool actually return ints
Their return values are compared as if they are at least tri-state
(-ve, 0, +ve), so really aren't bools at all.

Note - this should cause the code to change in behaviour, and thus might
introduce regressions as previously all non-zeroes would have been mapped
to 1.

Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib-storage/index/mbox/mbox-mail.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r b54844d64ee5 -r 973b67dda572 src/lib-storage/index/mbox/mbox-mail.c
--- a/src/lib-storage/index/mbox/mbox-mail.c	Tue May 27 21:17:34 2014 +0300
+++ b/src/lib-storage/index/mbox/mbox-mail.c	Tue May 27 21:17:34 2014 +0300
@@ -149,7 +149,7 @@
 	return 0;
 }
 
-static bool
+static int
 mbox_mail_get_md5_header(struct index_mail *mail, const char **value_r)
 {
 	struct mail *_mail = &mail->mail.mail;
@@ -237,7 +237,7 @@
 	return index_mail_get_special(_mail, field, value_r);
 }
 
-static bool
+static int
 mbox_mail_get_next_offset(struct index_mail *mail, uoff_t *next_offset_r)
 {
 	struct mbox_mailbox *mbox = (struct mbox_mailbox *)mail->mail.mail.box;


More information about the dovecot-cvs mailing list