lkml.org 
[lkml]   [2004]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kernel/ptrace.c BUG_ON fixes
Date
Hello

ptrace.c has some references to BUG() in form

if (condition)
BUG();

I've changed them in BUG_ON(condition);

Cheers,
Eduard Roccatello
--- /usr/src/linux/kernel/ptrace.c.orig 2004-01-25 23:19:22.000000000 +0100
+++ /usr/src/linux/kernel/ptrace.c 2004-01-25 23:20:58.000000000 +0100
@@ -28,8 +28,8 @@
*/
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);
@@ -46,8 +46,8 @@ void __ptrace_link(task_t *child, task_t
*/
void __ptrace_unlink(task_t *child)
{
- if (!child->ptrace)
- BUG();
+ BUG_ON(!child->ptrace);
+
child->ptrace = 0;
if (list_empty(&child->ptrace_list))
return;
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.271 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site