about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/misc/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc/ptrace.c b/src/misc/ptrace.c
index f8540698..83b8022b 100644
--- a/src/misc/ptrace.c
+++ b/src/misc/ptrace.c
@@ -17,9 +17,9 @@ long ptrace(int req, ...)
 	addr2 = va_arg(ap, void *);
 	va_end(ap);
 
-	if (req<4U) data = &result;
+	if (req-1U < 3) data = &result;
 	ret = syscall(SYS_ptrace, req, pid, addr, data, addr2);
 
-	if (ret<0 || req>=4U) return ret;
+	if (ret < 0 || req-1U >= 3) return ret;
 	return result;
 }