}
/* socket */
- if ((params->socket_id < 0) ||
- (params->socket_id >= RTE_MAX_NUMA_NODES)) {
+ if (params->socket_id < 0) {
RTE_LOG(ERR, PIPELINE,
"%s: Incorrect value for parameter socket_id\n",
__func__);
}
/* Save input parameters */
- snprintf(p->name, RTE_PIPELINE_MAX_NAME_SZ, "%s", params->name);
+ strlcpy(p->name, params->name, RTE_PIPELINE_MAX_NAME_SZ);
p->socket_id = params->socket_id;
p->offset_port_id = params->offset_port_id;
/* Allocate space for the default table entry */
entry_size = sizeof(struct rte_pipeline_table_entry) +
params->action_data_size;
- default_entry = (struct rte_pipeline_table_entry *) rte_zmalloc_socket(
+ default_entry = rte_zmalloc_socket(
"PIPELINE", entry_size, RTE_CACHE_LINE_SIZE, p->socket_id);
if (default_entry == NULL) {
RTE_LOG(ERR, PIPELINE,