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
test/compress: clarify out-of-space error messages
[dpdk.git]
/
lib
/
librte_latencystats
/
rte_latencystats.c
diff --git
a/lib/librte_latencystats/rte_latencystats.c
b/lib/librte_latencystats/rte_latencystats.c
index
5715549
..
06c6283
100644
(file)
--- a/
lib/librte_latencystats/rte_latencystats.c
+++ b/
lib/librte_latencystats/rte_latencystats.c
@@
-7,6
+7,7
@@
#include <stdbool.h>
#include <math.h>
#include <stdbool.h>
#include <math.h>
+#include <rte_string_fns.h>
#include <rte_mbuf.h>
#include <rte_log.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <rte_log.h>
#include <rte_cycles.h>
@@
-309,8
+310,8
@@
rte_latencystats_get_names(struct rte_metric_name *names, uint16_t size)
return NUM_LATENCY_STATS;
for (i = 0; i < NUM_LATENCY_STATS; i++)
return NUM_LATENCY_STATS;
for (i = 0; i < NUM_LATENCY_STATS; i++)
- s
nprintf(names[i].name, sizeof(names[i].name)
,
-
"%s", lat_stats_strings[i].name
);
+ s
trlcpy(names[i].name, lat_stats_strings[i].name
,
+
sizeof(names[i].name)
);
return NUM_LATENCY_STATS;
}
return NUM_LATENCY_STATS;
}