summaryrefslogtreecommitdiff
path: root/src/arch.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-03-19 15:18:46 -0400
committerPaul Moore <paul@paul-moore.com>2020-03-19 16:14:21 -0400
commit4f17cc4d2c74da99ccd619d2e9c8f41ac6ba2e2c (patch)
treea38542826ba77fa87b743569f4bda33ed82fce68 /src/arch.c
parent60ee8da07e42edbf22a5ecb0e258e04304b397fb (diff)
downloadlibseccomp-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch.c b/src/arch.c
index 83c2c9b..361afe7 100644
--- a/src/arch.c
+++ b/src/arch.c
@@ -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);