dovecot-2.2: Make static analyzer happier

dovecot at dovecot.org dovecot at dovecot.org
Thu May 8 09:39:52 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/c6c44f136100
changeset: 17348:c6c44f136100
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 08 12:39:10 2014 +0300
description:
Make static analyzer happier

diffstat:

 src/lib-mail/test-message-part.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r 10ce023ebf79 -r c6c44f136100 src/lib-mail/test-message-part.c
--- a/src/lib-mail/test-message-part.c	Thu May 08 11:29:34 2014 +0300
+++ b/src/lib-mail/test-message-part.c	Thu May 08 12:39:10 2014 +0300
@@ -73,8 +73,9 @@
 		prev_part = part;
 		part = message_part_by_idx(parts, i);
 		test_assert(part != NULL);
-		test_assert(message_part_to_idx(part) == i);
-		test_assert(prev_part->physical_pos < part->physical_pos);
+		test_assert(part != NULL && message_part_to_idx(part) == i);
+		test_assert(part != NULL &&
+			    prev_part->physical_pos < part->physical_pos);
 	}
 	test_assert(message_part_by_idx(parts, i) == NULL);
 


More information about the dovecot-cvs mailing list