Treewide: replace ssnprintf with snprintf
[collectd.git] / src / ipmi.c
index 98e77bf..ff79049 100644 (file)
@@ -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);