aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-16 01:37:36 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-09-05 00:47:33 -0400
commit4b80916b29170744632356dd2e801f7c374676eb (patch)
tree9714752ddfffd543dcd512a7f1920d53d92c1054 /fs/xfs
parent8da22d7a3690818f6d340baa0ea585e71f0c506f (diff)
[XFS] Fix sparse NULL vs 0 warnings
Sparse now warns about comparing pointers to 0, so change all instance where that happens to NULL instead. SGI-PV: 968555 SGI-Modid: xfs-linux-melb:xfs-kern:29308a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_log.c12
-rw-r--r--fs/xfs/xfs_log_recover.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 9d4c4fbeb3ee..9bfb69e1e885 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -2185,13 +2185,13 @@ xlog_state_do_callback(
2185 } 2185 }
2186 cb = iclog->ic_callback; 2186 cb = iclog->ic_callback;
2187 2187
2188 while (cb != 0) { 2188 while (cb) {
2189 iclog->ic_callback_tail = &(iclog->ic_callback); 2189 iclog->ic_callback_tail = &(iclog->ic_callback);
2190 iclog->ic_callback = NULL; 2190 iclog->ic_callback = NULL;
2191 LOG_UNLOCK(log, s); 2191 LOG_UNLOCK(log, s);
2192 2192
2193 /* perform callbacks in the order given */ 2193 /* perform callbacks in the order given */
2194 for (; cb != 0; cb = cb_next) { 2194 for (; cb; cb = cb_next) {
2195 cb_next = cb->cb_next; 2195 cb_next = cb->cb_next;
2196 cb->cb_func(cb->cb_arg, aborted); 2196 cb->cb_func(cb->cb_arg, aborted);
2197 } 2197 }
@@ -2202,7 +2202,7 @@ xlog_state_do_callback(
2202 loopdidcallbacks++; 2202 loopdidcallbacks++;
2203 funcdidcallbacks++; 2203 funcdidcallbacks++;
2204 2204
2205 ASSERT(iclog->ic_callback == 0); 2205 ASSERT(iclog->ic_callback == NULL);
2206 if (!(iclog->ic_state & XLOG_STATE_IOERROR)) 2206 if (!(iclog->ic_state & XLOG_STATE_IOERROR))
2207 iclog->ic_state = XLOG_STATE_DIRTY; 2207 iclog->ic_state = XLOG_STATE_DIRTY;
2208 2208
@@ -3242,10 +3242,10 @@ xlog_ticket_put(xlog_t *log,
3242#else 3242#else
3243 /* When we debug, it is easier if tickets are cycled */ 3243 /* When we debug, it is easier if tickets are cycled */
3244 ticket->t_next = NULL; 3244 ticket->t_next = NULL;
3245 if (log->l_tail != 0) { 3245 if (log->l_tail) {
3246 log->l_tail->t_next = ticket; 3246 log->l_tail->t_next = ticket;
3247 } else { 3247 } else {
3248 ASSERT(log->l_freelist == 0); 3248 ASSERT(log->l_freelist == NULL);
3249 log->l_freelist = ticket; 3249 log->l_freelist = ticket;
3250 } 3250 }
3251 log->l_tail = ticket; 3251 log->l_tail = ticket;
@@ -3463,7 +3463,7 @@ xlog_verify_iclog(xlog_t *log,
3463 s = LOG_LOCK(log); 3463 s = LOG_LOCK(log);
3464 icptr = log->l_iclog; 3464 icptr = log->l_iclog;
3465 for (i=0; i < log->l_iclog_bufs; i++) { 3465 for (i=0; i < log->l_iclog_bufs; i++) {
3466 if (icptr == 0) 3466 if (icptr == NULL)
3467 xlog_panic("xlog_verify_iclog: invalid ptr"); 3467 xlog_panic("xlog_verify_iclog: invalid ptr");
3468 icptr = icptr->ic_next; 3468 icptr = icptr->ic_next;
3469 } 3469 }
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index fddbb091a86f..8ae6e8e5f3db 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1366,7 +1366,7 @@ xlog_recover_add_to_cont_trans(
1366 int old_len; 1366 int old_len;
1367 1367
1368 item = trans->r_itemq; 1368 item = trans->r_itemq;
1369 if (item == 0) { 1369 if (item == NULL) {
1370 /* finish copying rest of trans header */ 1370 /* finish copying rest of trans header */
1371 xlog_recover_add_item(&trans->r_itemq); 1371 xlog_recover_add_item(&trans->r_itemq);
1372 ptr = (xfs_caddr_t) &trans->r_theader + 1372 ptr = (xfs_caddr_t) &trans->r_theader +
@@ -1412,7 +1412,7 @@ xlog_recover_add_to_trans(
1412 if (!len) 1412 if (!len)
1413 return 0; 1413 return 0;
1414 item = trans->r_itemq; 1414 item = trans->r_itemq;
1415 if (item == 0) { 1415 if (item == NULL) {
1416 ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC); 1416 ASSERT(*(uint *)dp == XFS_TRANS_HEADER_MAGIC);
1417 if (len == sizeof(xfs_trans_header_t)) 1417 if (len == sizeof(xfs_trans_header_t))
1418 xlog_recover_add_item(&trans->r_itemq); 1418 xlog_recover_add_item(&trans->r_itemq);
@@ -1467,12 +1467,12 @@ xlog_recover_unlink_tid(
1467 xlog_recover_t *tp; 1467 xlog_recover_t *tp;
1468 int found = 0; 1468 int found = 0;
1469 1469
1470 ASSERT(trans != 0); 1470 ASSERT(trans != NULL);
1471 if (trans == *q) { 1471 if (trans == *q) {
1472 *q = (*q)->r_next; 1472 *q = (*q)->r_next;
1473 } else { 1473 } else {
1474 tp = *q; 1474 tp = *q;
1475 while (tp != 0) { 1475 while (tp) {
1476 if (tp->r_next == trans) { 1476 if (tp->r_next == trans) {
1477 found = 1; 1477 found = 1;
1478 break; 1478 break;
@@ -1495,7 +1495,7 @@ xlog_recover_insert_item_backq(
1495 xlog_recover_item_t **q, 1495 xlog_recover_item_t **q,
1496 xlog_recover_item_t *item) 1496 xlog_recover_item_t *item)
1497{ 1497{
1498 if (*q == 0) { 1498 if (*q == NULL) {
1499 item->ri_prev = item->ri_next = item; 1499 item->ri_prev = item->ri_next = item;
1500 *q = item; 1500 *q = item;
1501 } else { 1501 } else {
@@ -1899,7 +1899,7 @@ xlog_recover_do_reg_buffer(
1899 break; 1899 break;
1900 nbits = xfs_contig_bits(data_map, map_size, bit); 1900 nbits = xfs_contig_bits(data_map, map_size, bit);
1901 ASSERT(nbits > 0); 1901 ASSERT(nbits > 0);
1902 ASSERT(item->ri_buf[i].i_addr != 0); 1902 ASSERT(item->ri_buf[i].i_addr != NULL);
1903 ASSERT(item->ri_buf[i].i_len % XFS_BLI_CHUNK == 0); 1903 ASSERT(item->ri_buf[i].i_len % XFS_BLI_CHUNK == 0);
1904 ASSERT(XFS_BUF_COUNT(bp) >= 1904 ASSERT(XFS_BUF_COUNT(bp) >=
1905 ((uint)bit << XFS_BLI_SHIFT)+(nbits<<XFS_BLI_SHIFT)); 1905 ((uint)bit << XFS_BLI_SHIFT)+(nbits<<XFS_BLI_SHIFT));