X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipmi.c;h=c8c80429d0813aa3ef7b2726a8d6d11373ca0d11;hb=e746ad785774de37a30302fef65f1c4aaf8698ab;hp=98e77bfe17472a4743098b509d54b7b587e065ad;hpb=5ff74d56067ac64db801df5184eb8b97f4b2b645;p=collectd.git diff --git a/src/ipmi.c b/src/ipmi.c index 98e77bfe..c8c80429 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,8 +123,8 @@ 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", - list_item->sensor_name); + snprintf(n.message, sizeof(n.message), "sensor %s not present", + list_item->sensor_name); plugin_dispatch_notification(&n); } @@ -172,8 +172,8 @@ 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", - list_item->sensor_name); + snprintf(n.message, sizeof(n.message), "sensor %s present", + list_item->sensor_name); plugin_dispatch_notification(&n); } @@ -223,8 +223,8 @@ 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, - entity_id_string); + snprintf(sensor_name, sizeof(sensor_name), "%s %s", buffer, + entity_id_string); sstrncpy(buffer, sensor_name, sizeof(buffer)); sensor_name_ptr = strstr(buffer, ")."); @@ -244,8 +244,8 @@ 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, - sensor_id_ptr); + snprintf(sensor_name, sizeof(sensor_name), "%s %s", sensor_name_ptr, + sensor_id_ptr); } /* else: don't touch sensor_name. */ } @@ -327,8 +327,8 @@ 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", - list_item->sensor_name); + snprintf(n.message, sizeof(n.message), "sensor %s added", + list_item->sensor_name); plugin_dispatch_notification(&n); } @@ -375,8 +375,8 @@ 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", - list_item->sensor_name); + snprintf(n.message, sizeof(n.message), "sensor %s removed", + list_item->sensor_name); plugin_dispatch_notification(&n); }