aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-09-27 20:58:40 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 20:58:40 -0400
commit1121b219bf3fe6d1bd1d1f7618cc5e0c409fabb4 (patch)
treee4fa877ce76e9d8aca0addf38611c882ff5d726a /fs/xfs
parent8801bb99e4425b9a778b355153ab3254bb431d92 (diff)
[XFS] use NULL for pointer initialisation instead of zero-cast-to-ptr
SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26562a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_alloc_btree.c8
-rw-r--r--fs/xfs/xfs_bmap_btree.c10
-rw-r--r--fs/xfs/xfs_ialloc.c4
-rw-r--r--fs/xfs/xfs_ialloc_btree.c8
4 files changed, 15 insertions, 15 deletions
diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c
index ec0bbd4140e4..500a1d75403a 100644
--- a/fs/xfs/xfs_alloc_btree.c
+++ b/fs/xfs/xfs_alloc_btree.c
@@ -670,7 +670,7 @@ xfs_alloc_insrec(
670 } 670 }
671#endif 671#endif
672 nbno = NULLAGBLOCK; 672 nbno = NULLAGBLOCK;
673 ncur = (xfs_btree_cur_t *)0; 673 ncur = NULL;
674 /* 674 /*
675 * If the block is full, we can't insert the new entry until we 675 * If the block is full, we can't insert the new entry until we
676 * make the block un-full. 676 * make the block un-full.
@@ -981,7 +981,7 @@ xfs_alloc_lookup(
981 */ 981 */
982 bp = cur->bc_bufs[level]; 982 bp = cur->bc_bufs[level];
983 if (bp && XFS_BUF_ADDR(bp) != d) 983 if (bp && XFS_BUF_ADDR(bp) != d)
984 bp = (xfs_buf_t *)0; 984 bp = NULL;
985 if (!bp) { 985 if (!bp) {
986 /* 986 /*
987 * Need to get a new buffer. Read it, then 987 * Need to get a new buffer. Read it, then
@@ -2044,7 +2044,7 @@ xfs_alloc_insert(
2044 nbno = NULLAGBLOCK; 2044 nbno = NULLAGBLOCK;
2045 nrec.ar_startblock = cpu_to_be32(cur->bc_rec.a.ar_startblock); 2045 nrec.ar_startblock = cpu_to_be32(cur->bc_rec.a.ar_startblock);
2046 nrec.ar_blockcount = cpu_to_be32(cur->bc_rec.a.ar_blockcount); 2046 nrec.ar_blockcount = cpu_to_be32(cur->bc_rec.a.ar_blockcount);
2047 ncur = (xfs_btree_cur_t *)0; 2047 ncur = NULL;
2048 pcur = cur; 2048 pcur = cur;
2049 /* 2049 /*
2050 * Loop going up the tree, starting at the leaf level. 2050 * Loop going up the tree, starting at the leaf level.
@@ -2076,7 +2076,7 @@ xfs_alloc_insert(
2076 */ 2076 */
2077 if (ncur) { 2077 if (ncur) {
2078 pcur = ncur; 2078 pcur = ncur;
2079 ncur = (xfs_btree_cur_t *)0; 2079 ncur = NULL;
2080 } 2080 }
2081 } while (nbno != NULLAGBLOCK); 2081 } while (nbno != NULLAGBLOCK);
2082 *stat = i; 2082 *stat = i;
diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c
index aab8e3f06aca..a7b835bf870a 100644
--- a/fs/xfs/xfs_bmap_btree.c
+++ b/fs/xfs/xfs_bmap_btree.c
@@ -352,7 +352,7 @@ xfs_bmbt_delrec(
352 XFS_BMBT_TRACE_CURSOR(cur, ENTRY); 352 XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
353 XFS_BMBT_TRACE_ARGI(cur, level); 353 XFS_BMBT_TRACE_ARGI(cur, level);
354 ptr = cur->bc_ptrs[level]; 354 ptr = cur->bc_ptrs[level];
355 tcur = (xfs_btree_cur_t *)0; 355 tcur = NULL;
356 if (ptr == 0) { 356 if (ptr == 0) {
357 XFS_BMBT_TRACE_CURSOR(cur, EXIT); 357 XFS_BMBT_TRACE_CURSOR(cur, EXIT);
358 *stat = 0; 358 *stat = 0;
@@ -755,7 +755,7 @@ xfs_bmbt_insrec(
755 ASSERT(level < cur->bc_nlevels); 755 ASSERT(level < cur->bc_nlevels);
756 XFS_BMBT_TRACE_CURSOR(cur, ENTRY); 756 XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
757 XFS_BMBT_TRACE_ARGIFR(cur, level, *bnop, recp); 757 XFS_BMBT_TRACE_ARGIFR(cur, level, *bnop, recp);
758 ncur = (xfs_btree_cur_t *)0; 758 ncur = NULL;
759 key.br_startoff = cpu_to_be64(xfs_bmbt_disk_get_startoff(recp)); 759 key.br_startoff = cpu_to_be64(xfs_bmbt_disk_get_startoff(recp));
760 optr = ptr = cur->bc_ptrs[level]; 760 optr = ptr = cur->bc_ptrs[level];
761 if (ptr == 0) { 761 if (ptr == 0) {
@@ -1126,7 +1126,7 @@ xfs_bmbt_lookup(
1126 d = XFS_FSB_TO_DADDR(mp, fsbno); 1126 d = XFS_FSB_TO_DADDR(mp, fsbno);
1127 bp = cur->bc_bufs[level]; 1127 bp = cur->bc_bufs[level];
1128 if (bp && XFS_BUF_ADDR(bp) != d) 1128 if (bp && XFS_BUF_ADDR(bp) != d)
1129 bp = (xfs_buf_t *)0; 1129 bp = NULL;
1130 if (!bp) { 1130 if (!bp) {
1131 if ((error = xfs_btree_read_bufl(mp, tp, fsbno, 1131 if ((error = xfs_btree_read_bufl(mp, tp, fsbno,
1132 0, &bp, XFS_BMAP_BTREE_REF))) { 1132 0, &bp, XFS_BMAP_BTREE_REF))) {
@@ -2170,7 +2170,7 @@ xfs_bmbt_insert(
2170 level = 0; 2170 level = 0;
2171 nbno = NULLFSBLOCK; 2171 nbno = NULLFSBLOCK;
2172 xfs_bmbt_disk_set_all(&nrec, &cur->bc_rec.b); 2172 xfs_bmbt_disk_set_all(&nrec, &cur->bc_rec.b);
2173 ncur = (xfs_btree_cur_t *)0; 2173 ncur = NULL;
2174 pcur = cur; 2174 pcur = cur;
2175 do { 2175 do {
2176 if ((error = xfs_bmbt_insrec(pcur, level++, &nbno, &nrec, &ncur, 2176 if ((error = xfs_bmbt_insrec(pcur, level++, &nbno, &nrec, &ncur,
@@ -2197,7 +2197,7 @@ xfs_bmbt_insert(
2197 } 2197 }
2198 if (ncur) { 2198 if (ncur) {
2199 pcur = ncur; 2199 pcur = ncur;
2200 ncur = (xfs_btree_cur_t *)0; 2200 ncur = NULL;
2201 } 2201 }
2202 } while (nbno != NULLFSBLOCK); 2202 } while (nbno != NULLFSBLOCK);
2203 XFS_BMBT_TRACE_CURSOR(cur, EXIT); 2203 XFS_BMBT_TRACE_CURSOR(cur, EXIT);
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 1a5e3ff33efd..76813d608dea 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -458,7 +458,7 @@ nextag:
458 */ 458 */
459 if (XFS_FORCED_SHUTDOWN(mp)) { 459 if (XFS_FORCED_SHUTDOWN(mp)) {
460 up_read(&mp->m_peraglock); 460 up_read(&mp->m_peraglock);
461 return (xfs_buf_t *)0; 461 return NULL;
462 } 462 }
463 agno++; 463 agno++;
464 if (agno >= agcount) 464 if (agno >= agcount)
@@ -466,7 +466,7 @@ nextag:
466 if (agno == pagno) { 466 if (agno == pagno) {
467 if (flags == 0) { 467 if (flags == 0) {
468 up_read(&mp->m_peraglock); 468 up_read(&mp->m_peraglock);
469 return (xfs_buf_t *)0; 469 return NULL;
470 } 470 }
471 flags = 0; 471 flags = 0;
472 } 472 }
diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c
index 9b6de4c2c2bb..8cdeeaf8632b 100644
--- a/fs/xfs/xfs_ialloc_btree.c
+++ b/fs/xfs/xfs_ialloc_btree.c
@@ -600,7 +600,7 @@ xfs_inobt_insrec(
600 } 600 }
601#endif 601#endif
602 nbno = NULLAGBLOCK; 602 nbno = NULLAGBLOCK;
603 ncur = (xfs_btree_cur_t *)0; 603 ncur = NULL;
604 /* 604 /*
605 * If the block is full, we can't insert the new entry until we 605 * If the block is full, we can't insert the new entry until we
606 * make the block un-full. 606 * make the block un-full.
@@ -878,7 +878,7 @@ xfs_inobt_lookup(
878 */ 878 */
879 bp = cur->bc_bufs[level]; 879 bp = cur->bc_bufs[level];
880 if (bp && XFS_BUF_ADDR(bp) != d) 880 if (bp && XFS_BUF_ADDR(bp) != d)
881 bp = (xfs_buf_t *)0; 881 bp = NULL;
882 if (!bp) { 882 if (!bp) {
883 /* 883 /*
884 * Need to get a new buffer. Read it, then 884 * Need to get a new buffer. Read it, then
@@ -1933,7 +1933,7 @@ xfs_inobt_insert(
1933 nrec.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino); 1933 nrec.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino);
1934 nrec.ir_freecount = cpu_to_be32(cur->bc_rec.i.ir_freecount); 1934 nrec.ir_freecount = cpu_to_be32(cur->bc_rec.i.ir_freecount);
1935 nrec.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free); 1935 nrec.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free);
1936 ncur = (xfs_btree_cur_t *)0; 1936 ncur = NULL;
1937 pcur = cur; 1937 pcur = cur;
1938 /* 1938 /*
1939 * Loop going up the tree, starting at the leaf level. 1939 * Loop going up the tree, starting at the leaf level.
@@ -1965,7 +1965,7 @@ xfs_inobt_insert(
1965 */ 1965 */
1966 if (ncur) { 1966 if (ncur) {
1967 pcur = ncur; 1967 pcur = ncur;
1968 ncur = (xfs_btree_cur_t *)0; 1968 ncur = NULL;
1969 } 1969 }
1970 } while (nbno != NULLAGBLOCK); 1970 } while (nbno != NULLAGBLOCK);
1971 *stat = i; 1971 *stat = i;