diff options
author | Paul Moore <paul@paul-moore.com> | 2020-03-19 15:18:46 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-03-19 16:14:21 -0400 |
commit | 4f17cc4d2c74da99ccd619d2e9c8f41ac6ba2e2c (patch) | |
tree | a38542826ba77fa87b743569f4bda33ed82fce68 /src/arch.c | |
parent | 60ee8da07e42edbf22a5ecb0e258e04304b397fb (diff) | |
download | libseccomp-4f17cc4d2c74da99ccd619d2e9c8f41ac6ba2e2c.tar.gz |
all: fix all the outstanding lgtm.com alerts
There are no functional changes in this patch, just some minor
changes found by the lgtm.com service:
* four functions in tools/util.c were "hiding" a global variable
with a local variable ("arch")
* src/arch.c had an unnecessary check in an if-condition
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'src/arch.c')
-rw-r--r-- | src/arch.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -374,10 +374,10 @@ int arch_syscall_rewrite(const struct arch_def *arch, int *syscall) if (sys >= -1) { /* we shouldn't be here - no rewrite needed */ return 0; - } else if (sys < -1 && sys > -100) { - /* reserved values */ + } else if (sys > -100) { + /* -2 to -99 are reserved values */ return -EINVAL; - } else if (sys <= -100 && sys > -10000) { + } else if (sys > -10000) { /* rewritable syscalls */ if (arch->syscall_rewrite) (*arch->syscall_rewrite)(syscall); |