X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fceph.c;h=19a09d861f308c1097b2e3dc9d4e4905f490b622;hb=6378ec288f34ff250b2971a1452338a2b34c240a;hp=c112af06e01c352c546d482bdf804e6faa245e5c;hpb=9be7c0d4d072bf1a8afce79fa2691a6610c4aeb6;p=collectd.git diff --git a/src/ceph.c b/src/ceph.c index c112af06..19a09d86 100644 --- a/src/ceph.c +++ b/src/ceph.c @@ -28,8 +28,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include #include @@ -251,7 +251,7 @@ static int ceph_cb_boolean(void *ctx, int bool_val) { return CEPH_CB_CONTINUE; } if (dest_size > dest_len) { \ sstrncpy((dest) + dest_len, (src), dest_size - dest_len); \ } \ - (dest)[dest_size - 1] = 0; \ + (dest)[dest_size - 1] = '\0'; \ } while (0) static int ceph_cb_number(void *ctx, const char *number_val, @@ -350,7 +350,7 @@ static int ceph_cb_map_key(void *ctx, const unsigned char *key, } memmove(state->key, key, sz - 1); - state->key[sz - 1] = 0; + state->key[sz - 1] = '\0'; return CEPH_CB_CONTINUE; }