diff options
author | Petr Tesarik <ptesarik@suse.cz> | 2008-09-03 07:31:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 11:53:16 -0400 |
commit | 4ab4ba32aa16b012cb0faabf1a27952508fe67f2 (patch) | |
tree | f14fc366eb714e996bec4d10ef9f8e9c674cf7aa /include/asm-x86/syscall.h | |
parent | 28c3cfd5fb998bd3683bebeebbba38baa2101cad (diff) |
x86, tracehook: clean up implementation of syscall_get_error()
The x86-tracehook code now contains this line in syscall_get_error():
return error >= -4095L ? error : 0;
Hard-wiring a constant is not nice. Let's use the IS_ERR_VALUE macro
from linux/err.h instead.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cc: utrace-devel@redhat.com
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/syscall.h')
-rw-r--r-- | include/asm-x86/syscall.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-x86/syscall.h b/include/asm-x86/syscall.h index 6f293892895a..04c47dc5597c 100644 --- a/include/asm-x86/syscall.h +++ b/include/asm-x86/syscall.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define _ASM_SYSCALL_H 1 | 14 | #define _ASM_SYSCALL_H 1 |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/err.h> | ||
17 | 18 | ||
18 | static inline long syscall_get_nr(struct task_struct *task, | 19 | static inline long syscall_get_nr(struct task_struct *task, |
19 | struct pt_regs *regs) | 20 | struct pt_regs *regs) |
@@ -47,7 +48,7 @@ static inline long syscall_get_error(struct task_struct *task, | |||
47 | */ | 48 | */ |
48 | error = (long) (int) error; | 49 | error = (long) (int) error; |
49 | #endif | 50 | #endif |
50 | return error >= -4095L ? error : 0; | 51 | return IS_ERR_VALUE(error) ? error : 0; |
51 | } | 52 | } |
52 | 53 | ||
53 | static inline long syscall_get_return_value(struct task_struct *task, | 54 | static inline long syscall_get_return_value(struct task_struct *task, |