X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dpdk.c;h=4b246c9ecb870b19c2d9d3d588346556776c1ffe;hb=e746ad785774de37a30302fef65f1c4aaf8698ab;hp=e3c737931a01f2f3c2a3084efb5eb8c222cc9d11;hpb=2b4445ea9b4b978468d75864f98e8137ba628dec;p=collectd.git diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c index e3c73793..4b246c9e 100644 --- a/src/utils_dpdk.c +++ b/src/utils_dpdk.c @@ -103,11 +103,11 @@ static void dpdk_helper_config_default(dpdk_helper_ctx_t *phc) { DPDK_HELPER_TRACE(phc->shm_name); - 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.process_type, DATA_MAX_NAME_LEN, "%s", "secondary"); - ssnprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, "%s", - DPDK_DEFAULT_RTE_CONFIG); + 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.process_type, DATA_MAX_NAME_LEN, "%s", "secondary"); + snprintf(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) { @@ -182,8 +182,8 @@ int dpdk_helper_eal_config_parse(dpdk_helper_ctx_t *phc, oconfig_item_t *ci) { DEBUG("dpdk_common: EAL:Process type %s", phc->eal_config.process_type); } else if ((strcasecmp("FilePrefix", child->key) == 0) && (child->values[0].type == OCONFIG_TYPE_STRING)) { - ssnprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, - "/var/run/.%s_config", child->values[0].value.string); + snprintf(phc->eal_config.file_prefix, DATA_MAX_NAME_LEN, + "/var/run/.%s_config", child->values[0].value.string); DEBUG("dpdk_common: EAL:File prefix %s", phc->eal_config.file_prefix); } else { ERROR("dpdk_common: Invalid '%s' configuration option", child->key); @@ -264,7 +264,7 @@ int dpdk_helper_data_size_get(dpdk_helper_ctx_t *phc) { return -EINVAL; } - return (phc->shm_size - sizeof(dpdk_helper_ctx_t)); + return phc->shm_size - sizeof(dpdk_helper_ctx_t); } int dpdk_helper_init(const char *name, size_t data_size,