X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fcommon.c;h=1775573a908376bc0fa07cd51b5cf4679d4ec58d;hb=ce2eb567629eb21d650d5c27fefe607837c061fd;hp=99f48caffa5ca9e25405fa05bf3332ef31763bea;hpb=063e81d76677a3b52c5d8a1fbfbdf2bf87a75cee;p=collectd.git diff --git a/src/daemon/common.c b/src/daemon/common.c index 99f48caf..1775573a 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -442,7 +442,7 @@ int strunescape(char *buf, size_t buf_len) { /* Move everything after the position one position to the left. * Add a null-byte as last character in the buffer. */ memmove(buf + i + 1, buf + i + 2, buf_len - i - 2); - buf[buf_len - 1] = 0; + buf[buf_len - 1] = '\0'; } return 0; } /* int strunescape */ @@ -1013,7 +1013,7 @@ int parse_value(const char *value_orig, value_t *ret_value, int ds_type) { value_len = strlen(value); while ((value_len > 0) && isspace((int)value[value_len - 1])) { - value[value_len - 1] = 0; + value[value_len - 1] = '\0'; value_len--; }