public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 02/10] scsi: fix integer as NULL pointer warnings
Date: Thu, 1 May 2008 00:29:41 +0100	[thread overview]
Message-ID: <20080501002941.7e1e2f4a@core> (raw)
In-Reply-To: <1209593020.24729.112.camel@brick>

> -				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

      parent reply	other threads:[~2008-04-30 23:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 22:03 [PATCH 02/10] scsi: fix integer as NULL pointer warnings Harvey Harrison
2008-04-30 22:29 ` James Bottomley
2008-04-30 22:34   ` Harvey Harrison
2008-04-30 22:54     ` James Bottomley
2008-05-01 21:50   ` Mark Harvey
2008-04-30 23:29 ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080501002941.7e1e2f4a@core \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox