Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77d76426 authored by Benjamin Poirier's avatar Benjamin Poirier Committed by Alexei Starovoitov
Browse files

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: bf598a8f ("bpftool: Improve handling of ENOENT on map dumps")
Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.com>
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 7f0c57fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)