[or-cvs] [tor/master] Add missing break statements for Coverity CIDs #406,407.
Nick Mathewson
nickm at seul.org
Tue Oct 27 02:40:43 UTC 2009
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon, 26 Oct 2009 21:35:26 -0400
Subject: Add missing break statements for Coverity CIDs #406,407.
Commit: 8bada1ef67cd7e84f3f22f7e4ef8eb99a8252776
The code for these was super-wrong, but will only break things when we
reset an option on a platform where sizeof(time_t) is different from
sizeof(int).
---
src/or/config.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/or/config.c b/src/or/config.c
index 4e2a176..128aa4d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2225,6 +2225,7 @@ option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var)
break;
case CONFIG_TYPE_ISOTIME:
*(time_t*)lvalue = 0;
+ break;
case CONFIG_TYPE_INTERVAL:
case CONFIG_TYPE_UINT:
case CONFIG_TYPE_BOOL:
@@ -2238,6 +2239,7 @@ option_clear(config_format_t *fmt, or_options_t *options, config_var_t *var)
routerset_free(*(routerset_t**)lvalue);
*(routerset_t**)lvalue = NULL;
}
+ break;
case CONFIG_TYPE_CSV:
if (*(smartlist_t**)lvalue) {
SMARTLIST_FOREACH(*(smartlist_t **)lvalue, char *, cp, tor_free(cp));
--
1.5.6.5
More information about the tor-commits
mailing list