BUG_ON() Conversion in kernel/ptrace.c
Subsystems (2)
PATCH 4/6 BUG_ON() Conversion in kernel/ptrace.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.
Signed-off-by Eric Sesterhenn <[email protected]>
kernel/ptrace.c renamed from kernel/ptrace.c.orig +2 -4
@@ -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);
@@ -72,8 +71,7 @@ void ptrace_untrace(task_t *child)*/ void __ptrace_unlink (task_t *child) { -if (!child->ptrace) -BUG (); +BUG_ON (!child->ptrace); child->ptrace =0 ;if (!list_empty (&child->ptrace_list)) {list_del_init (&child->ptrace_list);
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors