diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2020-06-11 12:33:41 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-06-11 23:52:19 +0200 |
commit | 2c4779eff837f1035f6f9650d246905daadd9528 (patch) | |
tree | 590ed0b5cc99e94266f3b68b14681223f85362dd /COPYING | |
parent | aa2cad0600ed2ca6a0ab39948d4db1666b6c962b (diff) | |
download | lwn-2c4779eff837f1035f6f9650d246905daadd9528.tar.gz lwn-2c4779eff837f1035f6f9650d246905daadd9528.zip |
tools, bpftool: Exit on error in function codegen
Currently, the codegen function might fail and return an error. But its
callers continue without checking its return value. Since codegen can
fail only in the unlikely case of the system running out of memory or
the static template being malformed, just exit(-1) directly from codegen
and make it void-returning.
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200611103341.21532-1-tklauser@distanz.ch
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions