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 <cristian.dumitrescu@intel.com>
This commit is contained in:
parent
6b840b7c53
commit
e8e22eb0dd
@ -8059,20 +8059,20 @@ instruction_config(struct rte_swx_pipeline *p,
|
|||||||
/* Memory allocation. */
|
/* Memory allocation. */
|
||||||
instr = calloc(n_instructions, sizeof(struct instruction));
|
instr = calloc(n_instructions, sizeof(struct instruction));
|
||||||
if (!instr) {
|
if (!instr) {
|
||||||
err = ENOMEM;
|
err = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = calloc(n_instructions, sizeof(struct instruction_data));
|
data = calloc(n_instructions, sizeof(struct instruction_data));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
err = ENOMEM;
|
err = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < n_instructions; i++) {
|
for (i = 0; i < n_instructions; i++) {
|
||||||
char *string = strdup(instructions[i]);
|
char *string = strdup(instructions[i]);
|
||||||
if (!string) {
|
if (!string) {
|
||||||
err = ENOMEM;
|
err = -ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user