aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
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/xfs_log.c
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/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c12
1 files changed, 6 insertions, 6 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 }