Merge pull request #3329 from efuss/fix-3311
[collectd.git] / src / ovs_events.c
index 0f9a57c..ae8ac3d 100644 (file)
@@ -158,8 +158,8 @@ static char *ovs_events_get_select_params() {
       return NULL;
     }
     opt_buff = new_buff;
-    int ret = snprintf(opt_buff + buff_off, buff_size - buff_off, option_fmt,
-                       iface->name);
+    int ret = ssnprintf(opt_buff + buff_off, buff_size - buff_off, option_fmt,
+                        iface->name);
     if (ret < 0) {
       sfree(opt_buff);
       return NULL;
@@ -339,9 +339,9 @@ ovs_events_dispatch_notification(const ovs_events_iface_info_t *ifinfo) {
   }
 
   /* fill the notification data */
-  snprintf(n.message, sizeof(n.message),
-           "link state of \"%s\" interface has been changed to \"%s\"",
-           ifinfo->name, msg_link_status);
+  ssnprintf(n.message, sizeof(n.message),
+            "link state of \"%s\" interface has been changed to \"%s\"",
+            ifinfo->name, msg_link_status);
   sstrncpy(n.host, hostname_g, sizeof(n.host));
   sstrncpy(n.plugin_instance, ifinfo->name, sizeof(n.plugin_instance));
   sstrncpy(n.type, "gauge", sizeof(n.type));