dovecot-2.2: trivial variable-non-use fixes

dovecot at dovecot.org dovecot at dovecot.org
Sat Jun 14 09:00:22 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/b9886d5e2225
changeset: 17491:b9886d5e2225
user:      Phil Carmody <phil at dovecot.fi>
date:      Sat Jun 14 11:58:57 2014 +0300
description:
trivial variable-non-use fixes
Flagged by coverity. In one, as we're printing an error message, we
can actually put the string to use, which might aid debugging. In
the other, the variable can just be killed.

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

diffstat:

 src/lib-imap-urlauth/imap-urlauth-connection.c    |  3 ++-
 src/lib-storage/list/mailbox-list-subscriptions.c |  3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r d2ecee775c1f -r b9886d5e2225 src/lib-imap-urlauth/imap-urlauth-connection.c
--- a/src/lib-imap-urlauth/imap-urlauth-connection.c	Fri Jun 13 16:12:27 2014 +0300
+++ b/src/lib-imap-urlauth/imap-urlauth-connection.c	Sat Jun 14 11:58:57 2014 +0300
@@ -835,7 +835,8 @@
 		if ((response = i_stream_next_line(conn->input)) == NULL)
 			return 0;
 
-		i_error("imap-urlauth: Received input while no requests were pending");
+		i_error("imap-urlauth: Received input while no requests were pending: %s",
+			str_sanitize(response, 80));
 		imap_urlauth_connection_abort(conn, NULL);
 		return -1;
 	case IMAP_URLAUTH_STATE_REQUEST_PENDING:
diff -r d2ecee775c1f -r b9886d5e2225 src/lib-storage/list/mailbox-list-subscriptions.c
--- a/src/lib-storage/list/mailbox-list-subscriptions.c	Fri Jun 13 16:12:27 2014 +0300
+++ b/src/lib-storage/list/mailbox-list-subscriptions.c	Sat Jun 14 11:58:57 2014 +0300
@@ -203,7 +203,6 @@
 {
 	struct mailbox_list_iter_update_context update_ctx;
 	struct mailbox_tree_iterate_context *iter;
-	struct mailbox_node *node;
 	const char *name;
 
 	memset(&update_ctx, 0, sizeof(update_ctx));
@@ -219,7 +218,7 @@
 
 	iter = mailbox_tree_iterate_init(ctx->list->subscriptions, NULL,
 					 MAILBOX_SUBSCRIBED);
-	while ((node = mailbox_tree_iterate_next(iter, &name)) != NULL)
+	while (mailbox_tree_iterate_next(iter, &name) != NULL)
 		mailbox_list_iter_update(&update_ctx, name);
 	mailbox_tree_iterate_deinit(&iter);
 }


More information about the dovecot-cvs mailing list