projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix sparse warnings and add an extra sprinkling of const.
[tinc]
/
src
/
conf.c
diff --git
a/src/conf.c
b/src/conf.c
index
5f8fdb1
..
b895b7f
100644
(file)
--- a/
src/conf.c
+++ b/
src/conf.c
@@
-92,7
+92,7
@@
void config_add(avl_tree_t *config_tree, config_t *cfg) {
avl_insert(config_tree, cfg);
}
avl_insert(config_tree, cfg);
}
-config_t *lookup_config(avl_tree_t *config_tree, char *variable) {
+config_t *lookup_config(
const
avl_tree_t *config_tree, char *variable) {
config_t cfg, *found;
cfg.variable = variable;
config_t cfg, *found;
cfg.variable = variable;
@@
-110,7
+110,7
@@
config_t *lookup_config(avl_tree_t *config_tree, char *variable) {
return found;
}
return found;
}
-config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) {
+config_t *lookup_config_next(
const
avl_tree_t *config_tree, const config_t *cfg) {
avl_node_t *node;
config_t *found;
avl_node_t *node;
config_t *found;
@@
-188,7
+188,7
@@
bool get_config_address(const config_t *cfg, struct addrinfo **result) {
}
bool get_config_subnet(const config_t *cfg, subnet_t ** result) {
}
bool get_config_subnet(const config_t *cfg, subnet_t ** result) {
- subnet_t subnet = {
0
};
+ subnet_t subnet = {
NULL
};
if(!cfg)
return false;
if(!cfg)
return false;
@@
-368,7
+368,7
@@
void read_config_options(avl_tree_t *config_tree, const char *prefix) {
}
}
}
}
-bool read_server_config() {
+bool read_server_config(
void
) {
char *fname;
bool x;
char *fname;
bool x;