diff options
author | Benjamin Poirier <bpoirier@suse.com> | 2019-04-11 17:03:32 +0900 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-04-25 17:30:14 -0700 |
commit | 77d764263d1165a2edf13735915fc39bc44abf1d (patch) | |
tree | ad753ffb68150f74bf080338fa84a832612275f5 /tools/bpf | |
parent | 7f0c57fec80f198ae9fcd06e5bbca13196815a4b (diff) |
bpftool: Fix errno variable usage
The test meant to use the saved value of errno. Given the current code, it
makes no practical difference however.
Fixes: bf598a8f0f77 ("bpftool: Improve handling of ENOENT on map dumps")
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index 10b6c9d3e525..e6dcb3653a77 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -724,7 +724,7 @@ static int dump_map_elem(int fd, void *key, void *value, } else { const char *msg = NULL; - if (errno == ENOENT) + if (lookup_errno == ENOENT) msg = "<no entry>"; else if (lookup_errno == ENOSPC && map_info->type == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY) |