]> err.no Git - linux-2.6/commitdiff
[XFS] use NULL for pointer initialisation instead of zero-cast-to-ptr
authorNathan Scott <nathans@sgi.com>
Thu, 28 Sep 2006 00:58:40 +0000 (10:58 +1000)
committerTim Shimmin <tes@sgi.com>
Thu, 28 Sep 2006 00:58:40 +0000 (10:58 +1000)
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>
fs/xfs/xfs_alloc_btree.c
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_ialloc_btree.c

index ec0bbd4140e498d1379f820a92c0705227d8cc46..500a1d75403a1428ce520fc8ab43506fc94d38d2 100644 (file)
@@ -670,7 +670,7 @@ xfs_alloc_insrec(
        }
 #endif
        nbno = NULLAGBLOCK;
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        /*
         * If the block is full, we can't insert the new entry until we
         * make the block un-full.
@@ -981,7 +981,7 @@ xfs_alloc_lookup(
                 */
                bp = cur->bc_bufs[level];
                if (bp && XFS_BUF_ADDR(bp) != d)
-                       bp = (xfs_buf_t *)0;
+                       bp = NULL;
                if (!bp) {
                        /*
                         * Need to get a new buffer.  Read it, then
@@ -2044,7 +2044,7 @@ xfs_alloc_insert(
        nbno = NULLAGBLOCK;
        nrec.ar_startblock = cpu_to_be32(cur->bc_rec.a.ar_startblock);
        nrec.ar_blockcount = cpu_to_be32(cur->bc_rec.a.ar_blockcount);
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        pcur = cur;
        /*
         * Loop going up the tree, starting at the leaf level.
@@ -2076,7 +2076,7 @@ xfs_alloc_insert(
                 */
                if (ncur) {
                        pcur = ncur;
-                       ncur = (xfs_btree_cur_t *)0;
+                       ncur = NULL;
                }
        } while (nbno != NULLAGBLOCK);
        *stat = i;
index aab8e3f06aca358d6bd93757a1c83b5d38fb04ae..a7b835bf870ae123b0e5839d0fc0dc51687f0326 100644 (file)
@@ -352,7 +352,7 @@ xfs_bmbt_delrec(
        XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
        XFS_BMBT_TRACE_ARGI(cur, level);
        ptr = cur->bc_ptrs[level];
-       tcur = (xfs_btree_cur_t *)0;
+       tcur = NULL;
        if (ptr == 0) {
                XFS_BMBT_TRACE_CURSOR(cur, EXIT);
                *stat = 0;
@@ -755,7 +755,7 @@ xfs_bmbt_insrec(
        ASSERT(level < cur->bc_nlevels);
        XFS_BMBT_TRACE_CURSOR(cur, ENTRY);
        XFS_BMBT_TRACE_ARGIFR(cur, level, *bnop, recp);
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        key.br_startoff = cpu_to_be64(xfs_bmbt_disk_get_startoff(recp));
        optr = ptr = cur->bc_ptrs[level];
        if (ptr == 0) {
@@ -1126,7 +1126,7 @@ xfs_bmbt_lookup(
                        d = XFS_FSB_TO_DADDR(mp, fsbno);
                        bp = cur->bc_bufs[level];
                        if (bp && XFS_BUF_ADDR(bp) != d)
-                               bp = (xfs_buf_t *)0;
+                               bp = NULL;
                        if (!bp) {
                                if ((error = xfs_btree_read_bufl(mp, tp, fsbno,
                                                0, &bp, XFS_BMAP_BTREE_REF))) {
@@ -2170,7 +2170,7 @@ xfs_bmbt_insert(
        level = 0;
        nbno = NULLFSBLOCK;
        xfs_bmbt_disk_set_all(&nrec, &cur->bc_rec.b);
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        pcur = cur;
        do {
                if ((error = xfs_bmbt_insrec(pcur, level++, &nbno, &nrec, &ncur,
@@ -2197,7 +2197,7 @@ xfs_bmbt_insert(
                }
                if (ncur) {
                        pcur = ncur;
-                       ncur = (xfs_btree_cur_t *)0;
+                       ncur = NULL;
                }
        } while (nbno != NULLFSBLOCK);
        XFS_BMBT_TRACE_CURSOR(cur, EXIT);
index 1a5e3ff33efdbe2a79fdd4fa509cbe0a4f83dc32..76813d608dea97fe97b8d76ca65e1cba2c7877d9 100644 (file)
@@ -458,7 +458,7 @@ nextag:
                 */
                if (XFS_FORCED_SHUTDOWN(mp)) {
                        up_read(&mp->m_peraglock);
-                       return (xfs_buf_t *)0;
+                       return NULL;
                }
                agno++;
                if (agno >= agcount)
@@ -466,7 +466,7 @@ nextag:
                if (agno == pagno) {
                        if (flags == 0) {
                                up_read(&mp->m_peraglock);
-                               return (xfs_buf_t *)0;
+                               return NULL;
                        }
                        flags = 0;
                }
index 9b6de4c2c2bb9977d2eea13d616b5bd6ba20912d..8cdeeaf8632b9bc7b1c5e5e19cf128908a91c2e3 100644 (file)
@@ -600,7 +600,7 @@ xfs_inobt_insrec(
        }
 #endif
        nbno = NULLAGBLOCK;
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        /*
         * If the block is full, we can't insert the new entry until we
         * make the block un-full.
@@ -878,7 +878,7 @@ xfs_inobt_lookup(
                 */
                bp = cur->bc_bufs[level];
                if (bp && XFS_BUF_ADDR(bp) != d)
-                       bp = (xfs_buf_t *)0;
+                       bp = NULL;
                if (!bp) {
                        /*
                         * Need to get a new buffer.  Read it, then
@@ -1933,7 +1933,7 @@ xfs_inobt_insert(
        nrec.ir_startino = cpu_to_be32(cur->bc_rec.i.ir_startino);
        nrec.ir_freecount = cpu_to_be32(cur->bc_rec.i.ir_freecount);
        nrec.ir_free = cpu_to_be64(cur->bc_rec.i.ir_free);
-       ncur = (xfs_btree_cur_t *)0;
+       ncur = NULL;
        pcur = cur;
        /*
         * Loop going up the tree, starting at the leaf level.
@@ -1965,7 +1965,7 @@ xfs_inobt_insert(
                 */
                if (ncur) {
                        pcur = ncur;
-                       ncur = (xfs_btree_cur_t *)0;
+                       ncur = NULL;
                }
        } while (nbno != NULLAGBLOCK);
        *stat = i;