dovecot-2.2: imap: cmd_getmetadata_stream_continue returns bool,...

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


details:   http://hg.dovecot.org/dovecot-2.2/rev/c2da4daac0b8
changeset: 17410:c2da4daac0b8
user:      Phil Carmody <phil at dovecot.fi>
date:      Tue May 27 21:17:34 2014 +0300
description:
imap: cmd_getmetadata_stream_continue returns bool, not int
The behaviour is unchanged, but we shouldn't pretend that -1 is different
from TRUE in a boolean context. Its only caller only cares about whether
it's 0 or not.

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

diffstat:

 src/imap/cmd-getmetadata.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 4f90011e9823 -r c2da4daac0b8 src/imap/cmd-getmetadata.c
--- a/src/imap/cmd-getmetadata.c	Tue May 27 21:17:34 2014 +0300
+++ b/src/imap/cmd-getmetadata.c	Tue May 27 21:17:34 2014 +0300
@@ -226,7 +226,7 @@
 			i_stream_get_error(ctx->cur_stream));
 		client_disconnect(ctx->cmd->client,
 				  "Internal GETMETADATA failure");
-		return -1;
+		return TRUE;
 	}
 	if (!i_stream_have_bytes_left(ctx->cur_stream)) {
 		/* Input stream gave less data than expected */
@@ -234,7 +234,7 @@
 			i_stream_get_name(ctx->cur_stream));
 		client_disconnect(ctx->cmd->client,
 				  "Internal GETMETADATA failure");
-		return -1;
+		return TRUE;
 	}
 	o_stream_set_flush_pending(ctx->cmd->client->output, TRUE);
 	return FALSE;


More information about the dovecot-cvs mailing list