diff --git a/src/ovs_events.c b/src/ovs_events.c
index 65042343215adb4d31d723a7d36cd4a5a56cd86c..afa11997cfc3a1ec8fadd50a29db39c1d0ecd7b3 100644 (file)
--- a/src/ovs_events.c
+++ b/src/ovs_events.c
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ *of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is furnished to do
+ * of the Software, and to permit persons to whom the Software is furnished to
+ *do
* so, subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included in all
+ * The above copyright notice and this permission notice shall be included in
+ *all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
return NULL;
}
opt_buff = new_buff;
- int ret = ssnprintf(opt_buff + buff_off, buff_size - buff_off, option_fmt,
- iface->name);
+ int ret = snprintf(opt_buff + buff_off, buff_size - buff_off, option_fmt,
+ iface->name);
if (ret < 0) {
sfree(opt_buff);
return NULL;
}
/* create OVS DB select params */
- if (ssnprintf(params_buff, params_size, params_fmt, opt_buff) < 0)
+ if (snprintf(params_buff, params_size, params_fmt, opt_buff) < 0)
sfree(params_buff);
sfree(opt_buff);
for (int j = 0; j < ci->values_num; j++) {
/* check interface name type */
if (ci->values[j].type != OCONFIG_TYPE_STRING) {
- ERROR(OVS_EVENTS_PLUGIN
- ": given interface name is not a string [idx=%d]", j);
+ ERROR(OVS_EVENTS_PLUGIN ": given interface name is not a string [idx=%d]",
+ j);
return -1;
}
/* allocate memory for configured interface */
}
/* Check and warn about invalid configuration */
if (!ovs_events_ctx.config.send_notification && !dispatch_values) {
- WARNING(OVS_EVENTS_PLUGIN ": send notification and dispatch values "
- "options are disabled. No information will be dispatched by the "
- "plugin. Please check your configuration");
+ WARNING(OVS_EVENTS_PLUGIN
+ ": send notification and dispatch values "
+ "options are disabled. No information will be dispatched by the "
+ "plugin. Please check your configuration");
}
/* Dispatch link status values if configured */
if (dispatch_values)
}
/* Dispatch OVS interface link status event to collectd */
-static void ovs_events_dispatch_notification(const ovs_events_iface_info_t *ifinfo) {
+static void
+ovs_events_dispatch_notification(const ovs_events_iface_info_t *ifinfo) {
const char *msg_link_status = NULL;
notification_t n = {
NOTIF_FAILURE, cdtime(), "", "", OVS_EVENTS_PLUGIN, "", "", "", NULL};
@@ -334,9 +339,9 @@ static void ovs_events_dispatch_notification(const ovs_events_iface_info_t *ifin
}
/* fill the notification data */
- ssnprintf(n.message, sizeof(n.message),
- "link state of \"%s\" interface has been changed to \"%s\"",
- ifinfo->name, msg_link_status);
+ snprintf(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));
@@ -345,7 +350,8 @@ static void ovs_events_dispatch_notification(const ovs_events_iface_info_t *ifin
}
/* Dispatch OVS interface link status value to collectd */
-static void ovs_events_link_status_submit(const ovs_events_iface_info_t *ifinfo) {
+static void
+ovs_events_link_status_submit(const ovs_events_iface_info_t *ifinfo) {
value_list_t vl = VALUE_LIST_INIT;
meta_data_t *meta = NULL;