dovecot-2.2: dict-redis: Small error handling fix to previous ch...

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 25 01:12:42 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/fd43098e23d0
changeset: 18108:fd43098e23d0
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Nov 25 03:12:25 2014 +0200
description:
dict-redis: Small error handling fix to previous change.

diffstat:

 src/lib-dict/dict-redis.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 5ee74bc88f18 -r fd43098e23d0 src/lib-dict/dict-redis.c
--- a/src/lib-dict/dict-redis.c	Tue Nov 25 03:10:41 2014 +0200
+++ b/src/lib-dict/dict-redis.c	Tue Nov 25 03:12:25 2014 +0200
@@ -352,13 +352,15 @@
 			i_free(dict->key_prefix);
 			dict->key_prefix = i_strdup(*args + 7);
 		} else if (strncmp(*args, "expire_secs=", 12) == 0) {
-			if (str_to_uint(*args + 12, &secs) < 0 || secs == 0) {
+			const char *value = *args + 12;
+
+			if (str_to_uint(value, &secs) < 0 || secs == 0) {
 				*error_r = t_strdup_printf(
-					"Invalid expire_secs: %s", *args+14);
+					"Invalid expire_secs: %s", value);
 				ret = -1;
 			}
 			i_free(dict->expire_value);
-			dict->expire_value = i_strdup(*args + 12);
+			dict->expire_value = i_strdup(value);
 		} else if (strncmp(*args, "timeout_msecs=", 14) == 0) {
 			if (str_to_uint(*args+14, &dict->timeout_msecs) < 0) {
 				*error_r = t_strdup_printf(


More information about the dovecot-cvs mailing list