X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils%2Fdpdk%2Fdpdk.c;h=efc39daecdbea7371c7cbb17fe575e76dcc54702;hb=c3716ec215af04261b03cb6804dd561574e5d40d;hp=5e38ab364020da772bf57f5b1698835cafe56883;hpb=25824c65721f0f21cadf1607fad367c7e7831816;p=collectd.git diff --git a/src/utils/dpdk/dpdk.c b/src/utils/dpdk/dpdk.c index 5e38ab36..efc39dae 100644 --- a/src/utils/dpdk/dpdk.c +++ b/src/utils/dpdk/dpdk.c @@ -110,10 +110,10 @@ static void dpdk_helper_config_default(dpdk_helper_ctx_t *phc) { DPDK_HELPER_TRACE(phc->shm_name); - snprintf(phc->eal_config.coremask, DATA_MAX_NAME_LEN, "%s", "0xf"); - snprintf(phc->eal_config.memory_channels, DATA_MAX_NAME_LEN, "%s", "1"); - snprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, "%s", - DPDK_DEFAULT_RTE_CONFIG); + ssnprintf(phc->eal_config.coremask, DATA_MAX_NAME_LEN, "%s", "0xf"); + ssnprintf(phc->eal_config.memory_channels, DATA_MAX_NAME_LEN, "%s", "1"); + ssnprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, "%s", + DPDK_DEFAULT_RTE_CONFIG); } int dpdk_helper_eal_config_set(dpdk_helper_ctx_t *phc, dpdk_eal_config_t *ec) { @@ -189,11 +189,11 @@ int dpdk_helper_eal_config_parse(dpdk_helper_ctx_t *phc, oconfig_item_t *ci) { status = cf_util_get_string_buffer(child, prefix, sizeof(prefix)); if (status == 0) { #if RTE_VERSION <= RTE_VERSION_NUM(18, 5, 0, 0) - snprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, - "/var/run/.%s_config", prefix); + ssnprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, + "/var/run/.%s_config", prefix); #else - snprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, - "/var/run/dpdk/%s/config", prefix); + ssnprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, + "/var/run/dpdk/%s/config", prefix); #endif DEBUG("dpdk_common: EAL:File prefix %s", phc->eal_config.file_prefix); } @@ -304,8 +304,8 @@ int dpdk_helper_init(const char *name, size_t data_size, DPDK_HELPER_TRACE(name); /* Allocate dpdk_helper_ctx_t and - * initialize a POSIX SHared Memory (SHM) object. - */ + * initialize a POSIX SHared Memory (SHM) object. + */ int err = dpdk_shm_init(name, shm_size, (void **)&phc); if (err != 0) { return -errno;