summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-02 13:43:40 +0200
committerAdrian Bunk <bunk@stusta.de>2006-04-02 13:43:40 +0200
commit524223ca8142d593124bde66f3ffa1deb6f56c06 (patch)
tree881d27c034459b931d8ba3adc0f1d2c8777fbf76 /kernel
parentBUG_ON() Conversion in ipc/shm.c (diff)
downloadlinux-524223ca8142d593124bde66f3ffa1deb6f56c06.tar.xz
linux-524223ca8142d593124bde66f3ffa1deb6f56c06.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ptrace.c3
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 @@
*/
void __ptrace_link(task_t *child, task_t *new_parent)
{
- if (!list_empty(&child->ptrace_list))
- BUG();
+ BUG_ON(!list_empty(&child->ptrace_list));
if (child->parent == new_parent)
return;
list_add(&child->ptrace_list, &child->parent->ptrace_children);