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/mlx5: replace external mbuf shared memory
[dpdk.git]
/
drivers
/
event
/
opdl
/
opdl_evdev_xstats.c
diff --git
a/drivers/event/opdl/opdl_evdev_xstats.c
b/drivers/event/opdl/opdl_evdev_xstats.c
index
0e6c6bd
..
27b3d88
100644
(file)
--- a/
drivers/event/opdl/opdl_evdev_xstats.c
+++ b/
drivers/event/opdl/opdl_evdev_xstats.c
@@
-32,10
+32,9
@@
opdl_xstats_init(struct rte_eventdev *dev)
uint32_t index = (i * max_num_port_xstat) + j;
/* Name */
uint32_t index = (i * max_num_port_xstat) + j;
/* Name */
- sprintf(device->port_xstat[index].stat.name,
- "port_%02u_%s",
- i,
- port_xstat_str[j]);
+ snprintf(device->port_xstat[index].stat.name,
+ sizeof(device->port_xstat[index].stat.name),
+ "port_%02u_%s", i, port_xstat_str[j]);
/* ID */
device->port_xstat[index].id = index;
/* ID */
device->port_xstat[index].id = index;