dovecot-2.2: lib: Make static analyzer happier

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 19 11:06:14 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/8d95e460094d
changeset: 18267:8d95e460094d
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 19 13:05:49 2015 +0200
description:
lib: Make static analyzer happier

diffstat:

 src/lib/test-istream.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r ca7441fc784e -r 8d95e460094d src/lib/test-istream.c
--- a/src/lib/test-istream.c	Thu Feb 19 13:05:31 2015 +0200
+++ b/src/lib/test-istream.c	Thu Feb 19 13:05:49 2015 +0200
@@ -32,8 +32,7 @@
 	test_assert(size == 3 && memcmp(data, "123", 3) == 0);
 	/* child1 check middle again.. the parent has been modified,
 	   so it can't return the original data (without some code changes). */
-	data = i_stream_get_data(child1, &size);
-	test_assert(size == 0);
+	test_assert(i_stream_get_data_size(child1) == 0);
 	i_stream_skip(child1, 3);
 	/* child1 read end */
 	test_assert(i_stream_read(child1) == 3);
@@ -42,8 +41,7 @@
 	i_stream_skip(child1, 3);
 	test_assert(i_stream_read(child1) == -1);
 	/* child2 check beginning again.. */
-	data = i_stream_get_data(child2, &size);
-	test_assert(size == 0);
+	test_assert(i_stream_get_data_size(child1) == 0);
 	i_stream_skip(child2, 3);
 	/* child2 read middle */
 	test_assert(i_stream_read(child2) == 3);


More information about the dovecot-cvs mailing list