X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl_json.c;h=a26664f05d0e6d66dfd28c372beb0009268671d0;hb=25824c65721f0f21cadf1607fad367c7e7831816;hp=dedfed05af376021f6d775b0b6453e31f6f28490;hpb=7c9d772c992647fcba64a96800c146eb9f1647f8;p=collectd.git diff --git a/src/curl_json.c b/src/curl_json.c index dedfed05..a26664f0 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -23,11 +23,11 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" -#include "utils_avltree.h" +#include "utils/avltree/avltree.h" +#include "utils/common/common.h" +#include "utils/curl_stats/curl_stats.h" #include "utils_complain.h" -#include "utils_curl_stats.h" #include #include @@ -236,7 +236,7 @@ static int cj_cb_number(void *ctx, const char *number, yajl_len_t number_len) { /* Create a null-terminated version of the string. */ char buffer[number_len + 1]; memcpy(buffer, number, number_len); - buffer[sizeof(buffer) - 1] = 0; + buffer[sizeof(buffer) - 1] = '\0'; if (db->state[db->depth].entry == NULL || db->state[db->depth].entry->type != KEY) { @@ -272,7 +272,7 @@ static int cj_cb_map_key(void *ctx, unsigned char const *in_name, char name[in_name_len + 1]; memmove(name, in_name, in_name_len); - name[sizeof(name) - 1] = 0; + name[sizeof(name) - 1] = '\0'; if (cj_load_key(ctx, name) != 0) return CJ_CB_ABORT;