fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / fs / reiserfs / item_ops.c
index e237cd6..b9b423b 100644 (file)
@@ -75,8 +75,7 @@ static int sd_create_vi(struct virtual_node *vn,
 static int sd_check_left(struct virtual_item *vi, int free,
                         int start_skip, int end_skip)
 {
-       if (start_skip || end_skip)
-               BUG();
+       BUG_ON(start_skip || end_skip);
        return -1;
 }
 
@@ -87,8 +86,7 @@ static int sd_check_right(struct virtual_item *vi, int free)
 
 static int sd_part_size(struct virtual_item *vi, int first, int count)
 {
-       if (count)
-               BUG();
+       BUG_ON(count);
        return 0;
 }
 
@@ -275,7 +273,7 @@ static void indirect_print_item(struct item_head *ih, char *item)
        int j;
        __le32 *unp;
        __u32 prev = INT_MAX;
-       int num;
+       int num = 0;
 
        unp = (__le32 *) item;
 
@@ -476,8 +474,7 @@ static int direntry_create_vi(struct virtual_node *vn,
 
        vi->vi_index = TYPE_DIRENTRY;
 
-       if (!(vi->vi_ih) || !vi->vi_item)
-               BUG();
+       BUG_ON(!(vi->vi_ih) || !vi->vi_item);
 
        dir_u->flags = 0;
        if (le_ih_k_offset(vi->vi_ih) == DOT_OFFSET)
@@ -575,8 +572,7 @@ static int direntry_check_right(struct virtual_item *vi, int free)
                free -= dir_u->entry_sizes[i];
                entries++;
        }
-       if (entries == dir_u->entry_count)
-               BUG();
+       BUG_ON(entries == dir_u->entry_count);
 
        /* "." and ".." can not be separated from each other */
        if ((dir_u->flags & DIRENTRY_VI_FIRST_DIRENTRY_ITEM)