Same -Wpendantic warnings fixes for plugin code.
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
static int dpdk_telemetry_config(oconfig_item_t *ci) {
int ret, i;
- DEBUG(PLUGIN_NAME ": %s:%d", __FUNCTION__, __LINE__);
+ DEBUG(PLUGIN_NAME ": %s:%d", __func__, __LINE__);
for (i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
}
if (ret < 0) {
- INFO(PLUGIN_NAME ": %s:%d ret =%d", __FUNCTION__, __LINE__, ret);
+ INFO(PLUGIN_NAME ": %s:%d ret =%d", __func__, __LINE__, ret);
return ret;
}
}
}
static int dpdk_telemetry_socket_init(void) {
- DEBUG(PLUGIN_NAME ": %s:%d", __FUNCTION__, __LINE__);
+ DEBUG(PLUGIN_NAME ": %s:%d", __func__, __LINE__);
char message[BUF_SIZE];
/* Here we look up the length of the g_dpdk_path string
}
static int dpdk_telemetry_shutdown(void) {
- DEBUG(PLUGIN_NAME ": %s:%d", __FUNCTION__, __LINE__);
+ DEBUG(PLUGIN_NAME ": %s:%d", __func__, __LINE__);
char msg[BUF_SIZE];
int ret;
}
static int dpdk_telemetry_read(user_data_t *ud) {
- DEBUG(PLUGIN_NAME ": %s:%d", __FUNCTION__, __LINE__);
+ DEBUG(PLUGIN_NAME ": %s:%d", __func__, __LINE__);
char buffer[BUF_SIZE];
int bytes = 0, ret;
char *json_string[MAX_COMMANDS] = {"{\"action\":0,\"command\":"
static int dpdk_telemetry_init(void) {
- DEBUG(PLUGIN_NAME ": %s:%d", __FUNCTION__, __LINE__);
+ DEBUG(PLUGIN_NAME ": %s:%d", __func__, __LINE__);
client.s_send = -1;
client.s_recv = -1;
#define DPDK_EVENTS_CTX_GET(a) ((dpdk_events_ctx_t *)dpdk_helper_priv_get(a))
#define DPDK_EVENTS_TRACE() \
- DEBUG("%s:%s:%d pid=%u", DPDK_EVENTS_PLUGIN, __FUNCTION__, __LINE__, getpid())
+ DEBUG("%s:%s:%d pid=%u", DPDK_EVENTS_PLUGIN, __func__, __LINE__, getpid())
static dpdk_helper_ctx_t *g_hc;
static dpdk_events_cfg_status g_state;
static int dpdk_events_link_status_dispatch(dpdk_helper_ctx_t *phc) {
dpdk_events_ctx_t *ec = DPDK_EVENTS_CTX_GET(phc);
- DEBUG(DPDK_EVENTS_PLUGIN ": %s:%d ports=%u", __FUNCTION__, __LINE__,
+ DEBUG(DPDK_EVENTS_PLUGIN ": %s:%d ports=%u", __func__, __LINE__,
ec->nb_ports);
/* dispatch Link Status values to collectd */
} else {
WARNING(DPDK_EVENTS_PLUGIN
": %s:%d Core id %u is out of 0 to %u range, skipping",
- __FUNCTION__, __LINE__, i, INT64_BIT_SIZE * 2);
+ __func__, __LINE__, i, INT64_BIT_SIZE * 2);
continue;
}
if (ka_ret) {
ERROR(DPDK_EVENTS_PLUGIN
": %s : error %d in dpdk_event_keep_alive_shm_open()",
- __FUNCTION__, ka_ret);
+ __func__, ka_ret);
} else
dpdk_events_keep_alive_dispatch(g_hc);
}
#define DPDK_STATS_NAME "dpdk_collectd_stats"
#define DPDK_STATS_TRACE() \
- DEBUG("%s:%s:%d pid=%u", DPDK_STATS_PLUGIN, __FUNCTION__, __LINE__, getpid())
+ DEBUG("%s:%s:%d pid=%u", DPDK_STATS_PLUGIN, __func__, __LINE__, getpid())
struct dpdk_stats_config_s {
cdtime_t interval;
stats_count += len;
}
- DPDK_CHILD_LOG("%s:%s:%d stats_count=%d\n", DPDK_STATS_PLUGIN, __FUNCTION__,
+ DPDK_CHILD_LOG("%s:%s:%d stats_count=%d\n", DPDK_STATS_PLUGIN, __func__,
__LINE__, stats_count);
return stats_count;
DPDK_CHILD_LOG(
DPDK_STATS_PLUGIN
":%s:%d not enough space for stats (available=%d, needed=%d)\n",
- __FUNCTION__, __LINE__, (int)dpdk_stats_get_size(phc), stats_size);
+ __func__, __LINE__, (int)dpdk_stats_get_size(phc), stats_size);
return -ENOBUFS;
}
/* dispatch stats values to collectd */
- DEBUG("%s:%s:%d ports=%u", DPDK_STATS_PLUGIN, __FUNCTION__, __LINE__,
+ DEBUG("%s:%s:%d ports=%u", DPDK_STATS_PLUGIN, __func__, __LINE__,
ctx->ports_count);
int stats_count = 0;
size_t data_size = sizeof(dpdk_stats_ctx_t) +
(ctx->stats_count * DPDK_STATS_CTX_GET_XSTAT_SIZE);
- DEBUG("%s:%d helper reinit (new_size=%" PRIsz ")", __FUNCTION__, __LINE__,
+ DEBUG("%s:%d helper reinit (new_size=%" PRIsz ")", __func__, __LINE__,
data_size);
dpdk_stats_ctx_t tmp_ctx;