X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdpdkstat.c;h=59ab9760033b5eba19a001c03a9ac35b73ef2bc5;hp=d36cb8fbbae9a2c44fbe3ffec9a264a6f66407e3;hb=77ca1a45bab2f6adf9301723d0db68e5813a6d98;hpb=af12cc40e48331f8c98294239cef60393218a46d diff --git a/src/dpdkstat.c b/src/dpdkstat.c index d36cb8fb..59ab9760 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -125,9 +125,8 @@ static int dpdk_stats_preinit(void) { int ret = dpdk_helper_init(g_shm_name, sizeof(dpdk_stats_ctx_t), &g_hc); if (ret != 0) { - char errbuf[ERR_BUF_SIZE]; ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN, - g_shm_name, sstrerror(errno, errbuf, sizeof(errbuf))); + g_shm_name, STRERRNO); return ret; } @@ -373,7 +372,6 @@ static void dpdk_stats_counter_submit(const char *plugin_instance, vl.values = &(value_t){.derive = value}; vl.values_len = 1; vl.time = port_read_time; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, DPDK_STATS_PLUGIN, sizeof(vl.plugin)); sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance)); dpdk_stats_resolve_cnt_type(vl.type, sizeof(vl.type), cnt_name); @@ -431,7 +429,7 @@ static int dpdk_stats_reinit_helper() { 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=%zu)", __FUNCTION__, __LINE__, + DEBUG("%s:%d helper reinit (new_size=%" PRIsz ")", __FUNCTION__, __LINE__, data_size); dpdk_stats_ctx_t tmp_ctx; @@ -447,9 +445,8 @@ static int dpdk_stats_reinit_helper() { int ret; ret = dpdk_helper_init(g_shm_name, data_size, &g_hc); if (ret != 0) { - char errbuf[ERR_BUF_SIZE]; ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN, - g_shm_name, sstrerror(errno, errbuf, sizeof(errbuf))); + g_shm_name, STRERRNO); return ret; }