X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fipmi.c;h=ff79049b0693183484a8e968d6d44bcf4ee9a955;hb=be126043c2be20399d7670fe194645292018bde0;hp=98e77bfe17472a4743098b509d54b7b587e065ad;hpb=867ad628dc6fcd05bd584b605d7093cfc00c3d07;p=collectd.git diff --git a/src/ipmi.c b/src/ipmi.c index 98e77bfe..ff79049b 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -83,7 +83,7 @@ static void c_ipmi_error(const char *func, int status) { } if (errbuf[0] == 0) { - ssnprintf(errbuf, sizeof(errbuf), "Unknown error %#x", status); + snprintf(errbuf, sizeof(errbuf), "Unknown error %#x", status); } errbuf[sizeof(errbuf) - 1] = 0; @@ -123,7 +123,7 @@ static void sensor_read_handler(ipmi_sensor_t *sensor, int err, sstrncpy(n.type_instance, list_item->sensor_name, sizeof(n.type_instance)); sstrncpy(n.type, list_item->sensor_type, sizeof(n.type)); - ssnprintf(n.message, sizeof(n.message), "sensor %s not present", + snprintf(n.message, sizeof(n.message), "sensor %s not present", list_item->sensor_name); plugin_dispatch_notification(&n); @@ -172,7 +172,7 @@ static void sensor_read_handler(ipmi_sensor_t *sensor, int err, sstrncpy(n.type_instance, list_item->sensor_name, sizeof(n.type_instance)); sstrncpy(n.type, list_item->sensor_type, sizeof(n.type)); - ssnprintf(n.message, sizeof(n.message), "sensor %s present", + snprintf(n.message, sizeof(n.message), "sensor %s present", list_item->sensor_name); plugin_dispatch_notification(&n); @@ -223,7 +223,7 @@ static int sensor_list_add(ipmi_sensor_t *sensor) { if (entity_id_string == NULL) sstrncpy(sensor_name, buffer, sizeof(sensor_name)); else - ssnprintf(sensor_name, sizeof(sensor_name), "%s %s", buffer, + snprintf(sensor_name, sizeof(sensor_name), "%s %s", buffer, entity_id_string); sstrncpy(buffer, sensor_name, sizeof(buffer)); @@ -244,7 +244,7 @@ static int sensor_list_add(ipmi_sensor_t *sensor) { sensor_id_ptr = strstr(buffer, "("); if (sensor_id_ptr != NULL) { /* `sensor_id_ptr' now points to "(123)". */ - ssnprintf(sensor_name, sizeof(sensor_name), "%s %s", sensor_name_ptr, + snprintf(sensor_name, sizeof(sensor_name), "%s %s", sensor_name_ptr, sensor_id_ptr); } /* else: don't touch sensor_name. */ @@ -327,7 +327,7 @@ static int sensor_list_add(ipmi_sensor_t *sensor) { sstrncpy(n.host, hostname_g, sizeof(n.host)); sstrncpy(n.type_instance, list_item->sensor_name, sizeof(n.type_instance)); sstrncpy(n.type, list_item->sensor_type, sizeof(n.type)); - ssnprintf(n.message, sizeof(n.message), "sensor %s added", + snprintf(n.message, sizeof(n.message), "sensor %s added", list_item->sensor_name); plugin_dispatch_notification(&n); @@ -375,7 +375,7 @@ static int sensor_list_remove(ipmi_sensor_t *sensor) { sstrncpy(n.host, hostname_g, sizeof(n.host)); sstrncpy(n.type_instance, list_item->sensor_name, sizeof(n.type_instance)); sstrncpy(n.type, list_item->sensor_type, sizeof(n.type)); - ssnprintf(n.message, sizeof(n.message), "sensor %s removed", + snprintf(n.message, sizeof(n.message), "sensor %s removed", list_item->sensor_name); plugin_dispatch_notification(&n);