mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
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.
This commit is contained in:
parent
53a94c4b4b
commit
1dc0d26b50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user