summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-15 13:52:56 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-15 13:52:56 -0400
commit1dc0d26b50929ad3969a6aa759ce71e0d089bb33 (patch)
tree6ecd90beb7c99dd617815ba5c7767fcbe56d60bc /src/or/dirserv.c
parent53a94c4b4bf2e75ec4c9132c91cf70ca4520bd1c (diff)
downloadtor-1dc0d26b50929ad3969a6aa759ce71e0d089bb33.tar.gz
tor-1dc0d26b50929ad3969a6aa759ce71e0d089bb33.zip
Clean up a clangalyzer warning in directory_remove_invalid
"At this point in the code, msg has been set to a string constant. But the tor code checks that msg is not NULL, and the redundant NULL check confuses the analyser[...] To avoid this spurious warning, the patch initialises msg to NULL." Patch from teor. another part of 13157.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index a5ad742b96..91314405df 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -664,7 +664,7 @@ directory_remove_invalid(void)
smartlist_add_all(nodes, nodelist_get_list());
SMARTLIST_FOREACH_BEGIN(nodes, node_t *, node) {
- const char *msg;
+ const char *msg = NULL;
routerinfo_t *ent = node->ri;
char description[NODE_DESC_BUF_LEN];
uint32_t r;