Commit fd7f9c7f authored by Daniel Borkmann's avatar Daniel Borkmann Committed by Stephen Hemminger

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: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 741c20b0
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#endif #endif
#ifndef ntohl #ifndef ntohl
# define ntohl(X) __constant_ntohl((X) # define ntohl(X) __constant_ntohl((X))
#endif #endif
/** Section helper macros. */ /** Section helper macros. */
......
...@@ -1042,7 +1042,7 @@ static int bpf_prog_attach(const char *section, ...@@ -1042,7 +1042,7 @@ static int bpf_prog_attach(const char *section,
"license:\'%s\') %s%s (%d)!\n\n", "license:\'%s\') %s%s (%d)!\n\n",
section, prog->type, section, prog->type,
prog->size / sizeof(struct bpf_insn), prog->size / sizeof(struct bpf_insn),
prog->license, fd < 0 ? "rejected :" : prog->license, fd < 0 ? "rejected: " :
"loaded", fd < 0 ? strerror(errno) : "", "loaded", fd < 0 ? strerror(errno) : "",
fd < 0 ? errno : fd); fd < 0 ? errno : fd);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment