diff mbox series

pipeline: adjust error code for internal function

Message ID 20210330101904.58023-1-cristian.dumitrescu@intel.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series pipeline: adjust error code for internal function | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/checkpatch success coding style OK

Commit Message

Dumitrescu, Cristian March 30, 2021, 10:19 a.m. UTC
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 <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_pipeline.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Monjalon April 20, 2021, 12:33 a.m. UTC | #1
30/03/2021 12:19, Cristian Dumitrescu:
> 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 <cristian.dumitrescu@intel.com>

Applied, thanks
diff mbox series

Patch

diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index 48ac250c1..f46f90c34 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -8049,20 +8049,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;
 		}