X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconf.c;h=0727953127e141ac633fc1e8e79bbaa911ab4b95;hp=c5467d20ad3028583f1be2afa486340df6b38de1;hb=930bf74fbe5ce8363b6cc2ae3a3e960e910e0996;hpb=20ae7dd8c12390f7360eb28cc17e1b8a8a706b06 diff --git a/src/conf.c b/src/conf.c index c5467d20..07279531 100644 --- a/src/conf.c +++ b/src/conf.c @@ -339,7 +339,7 @@ bool read_config_file(avl_tree_t *config_tree, const char *fname) { void read_config_options(avl_tree_t *config_tree, const char *prefix) { list_node_t *node, *next; - size_t prefix_len = strlen(prefix); + size_t prefix_len = prefix ? strlen(prefix) : 0; for(node = cmdline_conf->tail; node; node = next) { config_t *cfg = (config_t *)node->data; @@ -358,7 +358,6 @@ void read_config_options(avl_tree_t *config_tree, const char *prefix) { } bool read_server_config() { - list_node_t *node, *next; char *fname; bool x; @@ -377,8 +376,6 @@ bool read_server_config() { } bool read_connection_config(connection_t *c) { - list_node_t *node, *next; - size_t name_len = strlen(c->name); char *fname; bool x;