#include "packets.h"
#include "poll-loop.h"
#include "util.h"
+#include "valgrind.h"
#include "vlog.h"
#define THIS_MODULE VLM_dpif
fv.flows = flows;
fv.n_flows = n;
- for (i = 0; i < n; i++) {
- flows[i].actions = NULL;
- flows[i].n_actions = 0;
+ if (RUNNING_ON_VALGRIND) {
+ memset(flows, 0, n * sizeof *flows);
+ } else {
+ for (i = 0; i < n; i++) {
+ flows[i].actions = NULL;
+ flows[i].n_actions = 0;
+ }
}
error = IOCTL(dpif, ODP_FLOW_LIST, &fv);
*n_out = error ? 0 : fv.n_flows;