X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdpdkstat.c;h=b83131102878af52f81c23df2ba51e672f4baa80;hb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;hp=2f24630f2095f237f3d4a3750864de3d4d004151;hpb=0bfc2ea8afa790964166121b59b40a32665aba71;p=collectd.git diff --git a/src/dpdkstat.c b/src/dpdkstat.c index 2f24630f..b8313110 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -127,7 +127,7 @@ static int dpdk_stats_preinit(void) { 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 +373,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); @@ -397,9 +396,9 @@ static int dpdk_stats_counters_dispatch(dpdk_helper_ctx_t *phc) { char dev_name[64]; if (ctx->config.port_name[i][0] != 0) { - ssnprintf(dev_name, sizeof(dev_name), "%s", ctx->config.port_name[i]); + snprintf(dev_name, sizeof(dev_name), "%s", ctx->config.port_name[i]); } else { - ssnprintf(dev_name, sizeof(dev_name), "port.%d", i); + snprintf(dev_name, sizeof(dev_name), "port.%d", i); } DEBUG(" === Dispatch stats for port %d (name=%s; stats_count=%d)", i, @@ -449,7 +448,7 @@ static int dpdk_stats_reinit_helper() { 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; }