Skip to contentSkip to conversation

reiserfs: fix sparse warnings in fix_node.c

PATCH New Harvey Harrison 1 participant 1 message Feb 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 reiserfs: fix sparse warnings in fix_node.c

fs/reiserfs/fix_node.c:156:3: warning: Using plain integer as NULL pointer fs/reiserfs/fix_node.c:860:46: warning: Using plain integer as NULL pointer fs/reiserfs/fix_node.c:860:70: warning: Using plain integer as NULL pointer fs/reiserfs/fix_node.c:881:46: warning: Using plain integer as NULL pointer fs/reiserfs/fix_node.c:881:70: warning: Using plain integer as NULL pointer

---
 fs/reiserfs/fix_node.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
fs/reiserfs/fix_node.c +5 -3
index 0ee35c6..07d05e0 100644
@@ -153,7 +153,7 @@ static void create_virtual_node(struct tree_balance *tb, int h)
 	if (vn->vn_mode == M_INSERT) {
 		struct virtual_item *vi = vn->vn_vi + vn->vn_affected_item_num;
 
-		RFALSE(vn->vn_ins_ih == 0,
+		RFALSE(vn->vn_ins_ih == NULL,
 		       "vs-8040: item header of inserted item is not specified");
 		vi->vi_item_len = tb->insert_size[0];
 		vi->vi_ih = vn->vn_ins_ih;
@@ -857,7 +857,8 @@ static int get_lfree(struct tree_balance *tb, int h)
 	struct buffer_head *l, *f;
 	int order;
 
-	if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (l = tb->FL[h]) == 0)
+	if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
+	    (l = tb->FL[h]) == NULL)
 		return 0;
 
 	if (f == l)
@@ -878,7 +879,8 @@ static int get_rfree(struct tree_balance *tb, int h)
 	struct buffer_head *r, *f;
 	int order;
 
-	if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (r = tb->FR[h]) == 0)
+	if ((f = PATH_H_PPARENT(tb->tb_path, h)) == NULL ||
+	    (r = tb->FR[h]) == NULL)
 		return 0;
 
 	if (f == r)
Signature · 1 line
1.5.4.1.1278.gc75be