[05/16] latencystats: remove use of VLAs for Windows built code
Checks
Commit Message
MSVC does not support VLAs, replace VLAs with standard C arrays
or alloca(). alloca() is available for all toolchain/platform
combinations officially supported by DPDK.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/latencystats/rte_latencystats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -159,7 +159,7 @@ struct latency_stats_nameoff {
{
unsigned int i, cnt = 0;
uint64_t now;
- float latency[nb_pkts];
+ float *latency = alloca(sizeof(float) * nb_pkts);
static float prev_latency;
/*
* Alpha represents degree of weighting decrease in EWMA,