aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-03-28 23:07:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-30 17:18:41 -0400
commit9dce07f1a441b77a15631cf0ed0238e0baa7ed64 (patch)
tree2131d670d31ae4727b4234e3e0ad176ae103d571 /fs/reiserfs
parent1076d17ac70d1bb28fadc6f4bd96977b56897025 (diff)
NULL noise: fs/*, mm/*, kernel/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/do_balan.c8
-rw-r--r--fs/reiserfs/fix_node.c8
-rw-r--r--fs/reiserfs/lbalance.c2
-rw-r--r--fs/reiserfs/namei.c2
4 files changed, 11 insertions, 9 deletions
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
index f85c5cf4934c..7ee4208793b6 100644
--- a/fs/reiserfs/do_balan.c
+++ b/fs/reiserfs/do_balan.c
@@ -283,7 +283,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h
283 return balance_leaf_when_delete(tb, flag); 283 return balance_leaf_when_delete(tb, flag);
284 284
285 zeros_num = 0; 285 zeros_num = 0;
286 if (flag == M_INSERT && body == 0) 286 if (flag == M_INSERT && !body)
287 zeros_num = ih_item_len(ih); 287 zeros_num = ih_item_len(ih);
288 288
289 pos_in_item = tb->tb_path->pos_in_item; 289 pos_in_item = tb->tb_path->pos_in_item;
@@ -1728,7 +1728,7 @@ struct buffer_head *get_FEB(struct tree_balance *tb)
1728 struct buffer_info bi; 1728 struct buffer_info bi;
1729 1729
1730 for (i = 0; i < MAX_FEB_SIZE; i++) 1730 for (i = 0; i < MAX_FEB_SIZE; i++)
1731 if (tb->FEB[i] != 0) 1731 if (tb->FEB[i] != NULL)
1732 break; 1732 break;
1733 1733
1734 if (i == MAX_FEB_SIZE) 1734 if (i == MAX_FEB_SIZE)
@@ -1827,7 +1827,7 @@ int get_left_neighbor_position(struct tree_balance *tb, int h)
1827{ 1827{
1828 int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); 1828 int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1);
1829 1829
1830 RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FL[h] == 0, 1830 RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FL[h] == NULL,
1831 "vs-12325: FL[%d](%p) or F[%d](%p) does not exist", 1831 "vs-12325: FL[%d](%p) or F[%d](%p) does not exist",
1832 h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h)); 1832 h, tb->FL[h], h, PATH_H_PPARENT(tb->tb_path, h));
1833 1833
@@ -1841,7 +1841,7 @@ int get_right_neighbor_position(struct tree_balance *tb, int h)
1841{ 1841{
1842 int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1); 1842 int Sh_position = PATH_H_POSITION(tb->tb_path, h + 1);
1843 1843
1844 RFALSE(PATH_H_PPARENT(tb->tb_path, h) == 0 || tb->FR[h] == 0, 1844 RFALSE(PATH_H_PPARENT(tb->tb_path, h) == NULL || tb->FR[h] == NULL,
1845 "vs-12330: F[%d](%p) or FR[%d](%p) does not exist", 1845 "vs-12330: F[%d](%p) or FR[%d](%p) does not exist",
1846 h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]); 1846 h, PATH_H_PPARENT(tb->tb_path, h), h, tb->FR[h]);
1847 1847
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
index 0ee35c6c9b72..07d05e0842b7 100644
--- a/fs/reiserfs/fix_node.c
+++ b/fs/reiserfs/fix_node.c
@@ -153,7 +153,7 @@ static void create_virtual_node(struct tree_balance *tb, int h)
153 if (vn->vn_mode == M_INSERT) { 153 if (vn->vn_mode == M_INSERT) {
154 struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num; 154 struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num;
155 155
156 RFALSE(vn->vn_ins_ih == 0, 156 RFALSE(vn->vn_ins_ih == NULL,
157 "vs-8040: item header of inserted item is not specified"); 157 "vs-8040: item header of inserted item is not specified");
158 vi->vi_item_len = tb->insert_size[0]; 158 vi->vi_item_len = tb->insert_size[0];
159 vi->vi_ih = vn->vn_ins_ih; 159 vi->vi_ih = vn->vn_ins_ih;
@@ -857,7 +857,8 @@ static int get_lfree(struct tree_balance *tb, int h)
857 struct buffer_head *l, *f; 857 struct buffer_head *l, *f;
858 int order; 858 int order;
859 859
860 if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (l = tb->FL[h]) == 0) 860 if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
861 (l = tb->FL[h]) == NULL)
861 return 0; 862 return 0;
862 863
863 if (f == l) 864 if (f == l)
@@ -878,7 +879,8 @@ static int get_rfree(struct tree_balance *tb, int h)
878 struct buffer_head *r, *f; 879 struct buffer_head *r, *f;
879 int order; 880 int order;
880 881
881 if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (r = tb->FR[h]) == 0) 882 if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
883 (r = tb->FR[h]) == NULL)
882 return 0; 884 return 0;
883 885
884 if (f == r) 886 if (f == r)
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c
index 281f8061ac58..6de060a6aa7f 100644
--- a/fs/reiserfs/lbalance.c
+++ b/fs/reiserfs/lbalance.c
@@ -626,7 +626,7 @@ static void leaf_define_dest_src_infos(int shift_mode, struct tree_balance *tb,
626 "vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)", 626 "vs-10250: leaf_define_dest_src_infos: shift type is unknown (%d)",
627 shift_mode); 627 shift_mode);
628 } 628 }
629 RFALSE(src_bi->bi_bh == 0 || dest_bi->bi_bh == 0, 629 RFALSE(!src_bi->bi_bh || !dest_bi->bi_bh,
630 "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly", 630 "vs-10260: mode==%d, source (%p) or dest (%p) buffer is initialized incorrectly",
631 shift_mode, src_bi->bi_bh, dest_bi->bi_bh); 631 shift_mode, src_bi->bi_bh, dest_bi->bi_bh);
632} 632}
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index b378eea332ca..8867533cb727 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -452,7 +452,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
452 buflen = DEH_SIZE + ROUND_UP(namelen); 452 buflen = DEH_SIZE + ROUND_UP(namelen);
453 if (buflen > sizeof(small_buf)) { 453 if (buflen > sizeof(small_buf)) {
454 buffer = kmalloc(buflen, GFP_NOFS); 454 buffer = kmalloc(buflen, GFP_NOFS);
455 if (buffer == 0) 455 if (!buffer)
456 return -ENOMEM; 456 return -ENOMEM;
457 } else 457 } else
458 buffer = small_buf; 458 buffer = small_buf;