summaryrefslogtreecommitdiffstats
path: root/libnetdata/config
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-31 12:58:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-31 12:58:11 +0000
commitf99c4526d94d3e04124c5c48ab4a3da6ca53a458 (patch)
treea2ed8860030cc49f492b09b3222d593c65619800 /libnetdata/config
parentAdding upstream version 1.29.3. (diff)
downloadnetdata-upstream/1.30.0.tar.xz
netdata-upstream/1.30.0.zip
Adding upstream version 1.30.0.upstream/1.30.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--libnetdata/config/appconfig.c12
-rw-r--r--libnetdata/config/appconfig.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/libnetdata/config/appconfig.c b/libnetdata/config/appconfig.c
index d9dcde71a..f570f32d7 100644
--- a/libnetdata/config/appconfig.c
+++ b/libnetdata/config/appconfig.c
@@ -123,15 +123,15 @@ static int appconfig_option_compare(void *a, void *b) {
else return strcmp(((struct config_option *)a)->name, ((struct config_option *)b)->name);
}
-#define appconfig_option_index_add(co, cv) (struct config_option *)avl_insert_lock(&((co)->values_index), (avl *)(cv))
-#define appconfig_option_index_del(co, cv) (struct config_option *)avl_remove_lock(&((co)->values_index), (avl *)(cv))
+#define appconfig_option_index_add(co, cv) (struct config_option *)avl_insert_lock(&((co)->values_index), (avl_t *)(cv))
+#define appconfig_option_index_del(co, cv) (struct config_option *)avl_remove_lock(&((co)->values_index), (avl_t *)(cv))
static struct config_option *appconfig_option_index_find(struct section *co, const char *name, uint32_t hash) {
struct config_option tmp;
tmp.hash = (hash)?hash:simple_hash(name);
tmp.name = (char *)name;
- return (struct config_option *)avl_search_lock(&(co->values_index), (avl *) &tmp);
+ return (struct config_option *)avl_search_lock(&(co->values_index), (avl_t *) &tmp);
}
@@ -144,15 +144,15 @@ int appconfig_section_compare(void *a, void *b) {
else return strcmp(((struct section *)a)->name, ((struct section *)b)->name);
}
-#define appconfig_index_add(root, cfg) (struct section *)avl_insert_lock(&(root)->index, (avl *)(cfg))
-#define appconfig_index_del(root, cfg) (struct section *)avl_remove_lock(&(root)->index, (avl *)(cfg))
+#define appconfig_index_add(root, cfg) (struct section *)avl_insert_lock(&(root)->index, (avl_t *)(cfg))
+#define appconfig_index_del(root, cfg) (struct section *)avl_remove_lock(&(root)->index, (avl_t *)(cfg))
static struct section *appconfig_index_find(struct config *root, const char *name, uint32_t hash) {
struct section tmp;
tmp.hash = (hash)?hash:simple_hash(name);
tmp.name = (char *)name;
- return (struct section *)avl_search_lock(&root->index, (avl *) &tmp);
+ return (struct section *)avl_search_lock(&root->index, (avl_t *) &tmp);
}
diff --git a/libnetdata/config/appconfig.h b/libnetdata/config/appconfig.h
index 9d02e4ada..f405eeb09 100644
--- a/libnetdata/config/appconfig.h
+++ b/libnetdata/config/appconfig.h
@@ -111,7 +111,7 @@
#define CONFIG_VALUE_CHECKED 0x08 // has been checked if the value is different from the default
struct config_option {
- avl avl_node; // the index entry of this entry - this has to be first!
+ avl_t avl_node; // the index entry of this entry - this has to be first!
uint8_t flags;
uint32_t hash; // a simple hash to speed up searching
@@ -124,7 +124,7 @@ struct config_option {
};
struct section {
- avl avl_node; // the index entry of this section - this has to be first!
+ avl_t avl_node; // the index entry of this section - this has to be first!
uint32_t hash; // a simple hash to speed up searching
// we first compare hashes, and only if the hashes are equal we do string comparisons