lkml.org 
[lkml]   [2008]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/10] scsi: fix integer as NULL pointer warnings
> -				if (tw_dev->srb[request_id] != 0) {
> + if (tw_dev->srb[request_id]) {

For pointers we should use == NULL or != NULL.

Removing the comparison removes the warning but it doesn't replace it
with any useful typechecking as can be doing with NULL set as (void *)0.

This is thus a backward step.

Alan


\
 
 \ /
  Last update: 2008-05-01 01:41    [W:0.081 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site