diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-04-02 07:43:40 -0400 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-04-02 07:43:40 -0400 |
commit | 524223ca8142d593124bde66f3ffa1deb6f56c06 (patch) | |
tree | 881d27c034459b931d8ba3adc0f1d2c8777fbf76 | |
parent | 9ba025f10885758975fbbc2292a5b9e7cb8026a8 (diff) |
BUG_ON() Conversion in kernel/ptrace.c
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | kernel/ptrace.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 86a7f6c60cb2..0eeb7e66722c 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -30,8 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | void __ptrace_link(task_t *child, task_t *new_parent) | 31 | void __ptrace_link(task_t *child, task_t *new_parent) |
32 | { | 32 | { |
33 | if (!list_empty(&child->ptrace_list)) | 33 | BUG_ON(!list_empty(&child->ptrace_list)); |
34 | BUG(); | ||
35 | if (child->parent == new_parent) | 34 | if (child->parent == new_parent) |
36 | return; | 35 | return; |
37 | list_add(&child->ptrace_list, &child->parent->ptrace_children); | 36 | list_add(&child->ptrace_list, &child->parent->ptrace_children); |