Skip to content

Commit

Permalink
BUG_ON() Conversion in kernel/ptrace.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SesterhennEric authored and AdrianBunk committed Apr 2, 2006
1 parent 9ba025f commit 524223c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 524223c

Please sign in to comment.