Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 18.08
[deb_dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_bus.c
diff --git
a/lib/librte_eal/common/eal_common_bus.c
b/lib/librte_eal/common/eal_common_bus.c
index
3e022d5
..
0943851
100644
(file)
--- a/
lib/librte_eal/common/eal_common_bus.c
+++ b/
lib/librte_eal/common/eal_common_bus.c
@@
-36,6
+36,7
@@
#include <rte_bus.h>
#include <rte_debug.h>
#include <rte_bus.h>
#include <rte_debug.h>
+#include <rte_string_fns.h>
#include "eal_private.h"
#include "eal_private.h"
@@
-212,7
+213,7
@@
rte_bus_find_by_device_name(const char *str)
char name[RTE_DEV_NAME_MAX_LEN];
char *c;
char name[RTE_DEV_NAME_MAX_LEN];
char *c;
- s
nprintf(name, sizeof(name), "%s", str
);
+ s
trlcpy(name, str, sizeof(name)
);
c = strchr(name, ',');
if (c != NULL)
c[0] = '\0';
c = strchr(name, ',');
if (c != NULL)
c[0] = '\0';