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:
Daniel Borkmann 2015-12-14 16:57:32 +01:00 committed by Stephen Hemminger
parent 741c20b024
commit fd7f9c7fd1
2 changed files with 2 additions and 2 deletions

View File

@ -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. */

View File

@ -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);
} }