aboutsummaryrefslogtreecommitdiff
path: root/tc/e_bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tc/e_bpf.c')
-rw-r--r--tc/e_bpf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tc/e_bpf.c b/tc/e_bpf.c
index 2d650a46..84f43e6c 100644
--- a/tc/e_bpf.c
+++ b/tc/e_bpf.c
@@ -15,8 +15,8 @@
#include "utils.h"
#include "tc_util.h"
-#include "tc_bpf.h"
+#include "bpf_util.h"
#include "bpf_elf.h"
#include "bpf_scm.h"
@@ -56,8 +56,8 @@ static int parse_bpf(struct exec_util *eu, int argc, char **argv)
char **argv_run = argv_default, **envp_run, *tmp;
int ret, i, env_old, env_num, env_map;
const char *bpf_uds_name = NULL;
- int fds[BPF_SCM_MAX_FDS];
- struct bpf_map_aux aux;
+ int fds[BPF_SCM_MAX_FDS] = {};
+ struct bpf_map_aux aux = {};
if (argc == 0)
return 0;
@@ -115,9 +115,6 @@ static int parse_bpf(struct exec_util *eu, int argc, char **argv)
return -1;
}
- memset(fds, 0, sizeof(fds));
- memset(&aux, 0, sizeof(aux));
-
ret = bpf_recv_map_fds(bpf_uds_name, fds, &aux, ARRAY_SIZE(fds));
if (ret < 0) {
fprintf(stderr, "bpf: Could not receive fds!\n");