summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-06-06 14:06:28 -0400
committerPaul Moore <paul@paul-moore.com>2020-06-16 11:22:29 -0400
commit027cc6031461e67d4c6a9a3463540a8433f2fcd4 (patch)
tree31575b116d0347d739801e83ed94a15816569f53 /tools
parentc1ed3d958e53df9303dd48371b1225363803596b (diff)
downloadlibseccomp-027cc6031461e67d4c6a9a3463540a8433f2fcd4.tar.gz
tools,tests: fixup errno handling to be more consistent
The basic idea is that the C functions should return negative values on error and the terminal programs should return positive, non-zero values on error. Reported-by: Tom Hromatka <tom.hromatka@oracle.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/scmp_bpf_disasm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c
index 5c914b4..b95cdeb 100644
--- a/tools/scmp_bpf_disasm.c
+++ b/tools/scmp_bpf_disasm.c
@@ -288,7 +288,7 @@ static void bpf_decode_args(const bpf_instr_raw *bpf, unsigned int line)
* @param file the BPF program
*
* Read the BPF program and display the instructions. Returns zero on success,
- * negative values on failure.
+ * non-zero values on failure.
*
*/
static int bpf_decode(FILE *file)
@@ -424,7 +424,7 @@ static void bpf_dot_decode_args(const bpf_instr_raw *bpf, unsigned int line)
* @param file the BPF program
*
* Read the BPF program and display the instructions. Returns zero on success,
- * negative values on failure.
+ * non-zero values on failure.
*
*/
static int bpf_dot_decode(FILE *file)