X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipmi.c;h=58dfb41121ebab49f464264aff280f3ca5ee29f7;hb=711f5b6c86f51061c21bedcaa46214a01de0125c;hp=15909c2bc9e0fb4645cf5ef19ca0c88563be3698;hpb=5616ea4da99ee3b1cc5de14b2d6e22f956d48674;p=collectd.git diff --git a/src/ipmi.c b/src/ipmi.c index 15909c2b..58dfb411 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -113,7 +113,7 @@ static void c_ipmi_error(c_ipmi_instance_t *st, const char *func, int status) { if (errbuf[0] == 0) { snprintf(errbuf, sizeof(errbuf), "Unknown error %#x", status); } - errbuf[sizeof(errbuf) - 1] = 0; + errbuf[sizeof(errbuf) - 1] = '\0'; ERROR("ipmi plugin: %s failed for `%s`: %s", func, st->name, errbuf); } /* void c_ipmi_error */ @@ -310,7 +310,7 @@ static void sensor_get_name(ipmi_sensor_t *sensor, char *buffer, int buf_len) { return; ipmi_sensor_get_name(sensor, temp, sizeof(temp)); - temp[sizeof(temp) - 1] = 0; + temp[sizeof(temp) - 1] = '\0'; if (entity_id_string != NULL && strlen(temp)) snprintf(sensor_name, sizeof(sensor_name), "%s %s", temp, entity_id_string);