Run clang-format after removing ssnprintf
[collectd.git] / src / ipmi.c
index 98e77bf..c8c8042 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,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);
   }