dovecot-2.2-pigeonhole: sieve extprograms plugin: Fixed dead cod...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Tue Jun 17 21:29:35 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/9401789c7332
changeset: 1877:9401789c7332
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Jun 17 23:28:53 2014 +0200
description:
sieve extprograms plugin: Fixed dead code problems.
Reported by Coverity.

diffstat:

 src/plugins/sieve-extprograms/cmd-execute.c |  10 ++++------
 src/plugins/sieve-extprograms/cmd-pipe.c    |   3 ---
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs (41 lines):

diff -r 1c7a4ec3fd80 -r 9401789c7332 src/plugins/sieve-extprograms/cmd-execute.c
--- a/src/plugins/sieve-extprograms/cmd-execute.c	Tue Jun 17 23:19:37 2014 +0200
+++ b/src/plugins/sieve-extprograms/cmd-execute.c	Tue Jun 17 23:28:53 2014 +0200
@@ -335,15 +335,13 @@
 
 		switch ( opt_code ) {
 		case OPT_INPUT:
-			if ( (ret=sieve_opr_string_read_ex
-				(renv, address, "input", TRUE, &input, NULL)) <= 0 )
-				return ret;
+			ret = sieve_opr_string_read_ex
+				(renv, address, "input", TRUE, &input, NULL);
 			have_input = TRUE;
 			break;
 		case OPT_OUTPUT:
-			if ( (ret=sieve_variable_operand_read
-				(renv, address, "output", &var_storage, &var_index)) <= 0 )
-				return ret;
+			ret = sieve_variable_operand_read
+				(renv, address, "output", &var_storage, &var_index);
 			break;
 		default:
 			sieve_runtime_trace_error(renv, "unknown optional operand");
diff -r 1c7a4ec3fd80 -r 9401789c7332 src/plugins/sieve-extprograms/cmd-pipe.c
--- a/src/plugins/sieve-extprograms/cmd-pipe.c	Tue Jun 17 23:19:37 2014 +0200
+++ b/src/plugins/sieve-extprograms/cmd-pipe.c	Tue Jun 17 23:28:53 2014 +0200
@@ -222,14 +222,11 @@
 		switch ( opt_code ) {
 		case OPT_TRY:
 			try = TRUE;
-			ret = SIEVE_EXEC_OK;
 			break;
 		default:
 			sieve_runtime_trace_error(renv, "unknown optional operand");
 			return SIEVE_EXEC_BIN_CORRUPT;
 		}
-
-		if ( ret <= 0 ) return ret;
 	}
 
 	/* Fixed operands */


More information about the dovecot-cvs mailing list