bpf: minor fix in api and bpf_dump_error() usage
Fix a whitespace in bpf_dump_error() usage, and also a missing closing bracket in ntohl() macro for eBPF programs. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
741c20b024
commit
fd7f9c7fd1
|
|
@ -53,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef ntohl
|
||||
# define ntohl(X) __constant_ntohl((X)
|
||||
# define ntohl(X) __constant_ntohl((X))
|
||||
#endif
|
||||
|
||||
/** Section helper macros. */
|
||||
|
|
|
|||
|
|
@ -1042,7 +1042,7 @@ static int bpf_prog_attach(const char *section,
|
|||
"license:\'%s\') %s%s (%d)!\n\n",
|
||||
section, prog->type,
|
||||
prog->size / sizeof(struct bpf_insn),
|
||||
prog->license, fd < 0 ? "rejected :" :
|
||||
prog->license, fd < 0 ? "rejected: " :
|
||||
"loaded", fd < 0 ? strerror(errno) : "",
|
||||
fd < 0 ? errno : fd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue