From e8e22eb0ddb6736745ad80e337848860107c4aee Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Tue, 30 Mar 2021 11:19:04 +0100 Subject: [PATCH] pipeline: adjust error code for internal function Adjusting the error code for the internal function instruction_config to match the rest of the code which is returning a negative value on error. Cosmetic change. Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index 52987870de..2956dde77f 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -8059,20 +8059,20 @@ instruction_config(struct rte_swx_pipeline *p, /* Memory allocation. */ instr = calloc(n_instructions, sizeof(struct instruction)); if (!instr) { - err = ENOMEM; + err = -ENOMEM; goto error; } data = calloc(n_instructions, sizeof(struct instruction_data)); if (!data) { - err = ENOMEM; + err = -ENOMEM; goto error; } for (i = 0; i < n_instructions; i++) { char *string = strdup(instructions[i]); if (!string) { - err = ENOMEM; + err = -ENOMEM; goto error; } -- 2.20.1