diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2018-03-27 21:28:27 +0000 |
commit | eb7cc2640201f168bbd9a05799fd2dbe823bb57c (patch) | |
tree | 1f88da02b7ee3c16ced7b5f7dc4aadb190766e7c /src/appconfig.c | |
parent | Release v. 1.9.0+dfsg-1 to Unstable (diff) | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.tar.xz netdata-eb7cc2640201f168bbd9a05799fd2dbe823bb57c.zip |
Update upstream source from tag 'upstream/1.10.0+dfsg'
Update to upstream version '1.10.0+dfsg'
with Debian dir fa5485f3d9aea3038a19eff06ba33374ac5c5d7c
Diffstat (limited to 'src/appconfig.c')
-rw-r--r-- | src/appconfig.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/appconfig.c b/src/appconfig.c index 40cade818..2424864b5 100644 --- a/src/appconfig.c +++ b/src/appconfig.c @@ -110,8 +110,8 @@ static 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 *)(cfg)) +#define appconfig_index_del(root, cfg) (struct section *)avl_remove_lock(&(root)->index, (avl *)(cfg)) static struct section *appconfig_index_find(struct config *root, const char *name, uint32_t hash) { struct section tmp; @@ -297,10 +297,10 @@ long long appconfig_get_number(struct config *root, const char *section, const c return strtoll(s, NULL, 0); } -long double appconfig_get_float(struct config *root, const char *section, const char *name, long double value) +LONG_DOUBLE appconfig_get_float(struct config *root, const char *section, const char *name, LONG_DOUBLE value) { char buffer[100], *s; - sprintf(buffer, "%0.5Lf", value); + sprintf(buffer, "%0.5" LONG_DOUBLE_MODIFIER, value); s = appconfig_get(root, section, name, buffer); if(!s) return value; @@ -407,10 +407,10 @@ long long appconfig_set_number(struct config *root, const char *section, const c return value; } -long double appconfig_set_float(struct config *root, const char *section, const char *name, long double value) +LONG_DOUBLE appconfig_set_float(struct config *root, const char *section, const char *name, LONG_DOUBLE value) { char buffer[100]; - sprintf(buffer, "%0.5Lf", value); + sprintf(buffer, "%0.5" LONG_DOUBLE_MODIFIER, value); appconfig_set(root, section, name, buffer); |