summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa07a9a)
raw | patch | inline | side by side (parent: fa07a9a)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 1 Aug 2016 20:31:31 +0000 (22:31 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Mon, 1 Aug 2016 20:43:10 +0000 (22:43 +0200) |
also use '\0' not 0 while we're here
src/ceph.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index c34d209e08d21e5e1b9aa6b168358f2488c8f082..34aa7b1679324e832acdd1ad65e84f715fe477c4 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
#define BUFFER_ADD(dest, src) do { \
size_t dest_size = sizeof (dest); \
strncat ((dest), (src), dest_size - strlen (dest)); \
- (dest)[dest_size - 1] = 0; \
+ (dest)[dest_size - 1] = '\0'; \
} while (0)
static int
{
yajl_struct *state = (yajl_struct*) ctx;
char buffer[number_len+1];
- char key[2 * DATA_MAX_NAME_LEN] = { 0 };
+ char key[2 * DATA_MAX_NAME_LEN];
_Bool latency_type = 0;
size_t i;
int status;
+ key[0] = '\0';
memcpy(buffer, number_val, number_len);
- buffer[sizeof(buffer) - 1] = 0;
+ buffer[sizeof(buffer) - 1] = '\0';
for (i = 0; i < state->depth; i++)
{
int pc_type)
{
uint32_t type;
- char ds_name[DATA_MAX_NAME_LEN] = { 0 };
+ char ds_name[DATA_MAX_NAME_LEN];
if(convert_special_metrics)
{
uint32_t type = DSET_TYPE_UNFOUND;
int index = vtmp->index;
- char ds_name[DATA_MAX_NAME_LEN] = { 0 };
+ char ds_name[DATA_MAX_NAME_LEN];
if (parse_keys (ds_name, sizeof (ds_name), key))
{