* [dpdk-dev] [PATCH] pipeline: adjust error code for internal function
@ 2021-03-30 10:19 Cristian Dumitrescu
2021-04-20 0:33 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Cristian Dumitrescu @ 2021-03-30 10:19 UTC (permalink / raw)
To: dev
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(-)
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;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] pipeline: adjust error code for internal function
2021-03-30 10:19 [dpdk-dev] [PATCH] pipeline: adjust error code for internal function Cristian Dumitrescu
@ 2021-04-20 0:33 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-04-20 0:33 UTC (permalink / raw)
To: Cristian Dumitrescu; +Cc: dev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-20 0:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 10:19 [dpdk-dev] [PATCH] pipeline: adjust error code for internal function Cristian Dumitrescu
2021-04-20 0:33 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).