git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice/base: use a different log type for FW
[dpdk.git]
/
lib
/
librte_lpm
/
rte_lpm.c
diff --git
a/lib/librte_lpm/rte_lpm.c
b/lib/librte_lpm/rte_lpm.c
index
d464dbd
..
6b7b28a
100644
(file)
--- a/
lib/librte_lpm/rte_lpm.c
+++ b/
lib/librte_lpm/rte_lpm.c
@@
-180,6
+180,7
@@
rte_lpm_create_v20(const char *name, int socket_id, int max_rules,
}
if (te != NULL) {
}
if (te != NULL) {
+ lpm = NULL;
rte_errno = EEXIST;
goto exit;
}
rte_errno = EEXIST;
goto exit;
}
@@
-204,7
+205,7
@@
rte_lpm_create_v20(const char *name, int socket_id, int max_rules,
/* Save user arguments. */
lpm->max_rules = max_rules;
/* Save user arguments. */
lpm->max_rules = max_rules;
- s
nprintf(lpm->name, sizeof(lpm->name), "%s", name
);
+ s
trlcpy(lpm->name, name, sizeof(lpm->name)
);
te->data = lpm;
te->data = lpm;
@@
-256,6
+257,7
@@
rte_lpm_create_v1604(const char *name, int socket_id,
}
if (te != NULL) {
}
if (te != NULL) {
+ lpm = NULL;
rte_errno = EEXIST;
goto exit;
}
rte_errno = EEXIST;
goto exit;
}
@@
-306,7
+308,7
@@
rte_lpm_create_v1604(const char *name, int socket_id,
/* Save user arguments. */
lpm->max_rules = config->max_rules;
lpm->number_tbl8s = config->number_tbl8s;
/* Save user arguments. */
lpm->max_rules = config->max_rules;
lpm->number_tbl8s = config->number_tbl8s;
- s
nprintf(lpm->name, sizeof(lpm->name), "%s", name
);
+ s
trlcpy(lpm->name, name, sizeof(lpm->name)
);
te->data = lpm;
te->data = lpm;