X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdpdkstat.c;h=7ef1179173498b7814f9dae8702cf4a5f040bafc;hp=2f24630f2095f237f3d4a3750864de3d4d004151;hb=7b8851b26928b609ce850e78c1eabb50ff319244;hpb=0bfc2ea8afa790964166121b59b40a32665aba71 diff --git a/src/dpdkstat.c b/src/dpdkstat.c index 2f24630f..7ef11791 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -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, @@ -431,7 +430,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;