linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	linux-iio@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging/iio: Use correct argument for sizeof
Date: Tue, 22 Jan 2013 09:43:51 +0300	[thread overview]
Message-ID: <20130122064351.GV4584@mwanda> (raw)
In-Reply-To: <1358802842-27614-1-git-send-email-peterhuewe@gmx.de>

On Mon, Jan 21, 2013 at 10:14:02PM +0100, Peter Huewe wrote:
> found with coccicheck
> sizeof when applied to a pointer typed expression gives the size of
> the pointer
> 

The original code is correct, in this case.  We're storing an array
of pointers and the last element in the array is a NULL.

> The semantic patch that makes this output is available
> in scripts/coccinelle/misc/noderef.cocci.
> 
> More information about semantic patching is available at
> http://coccinelle.lip6.fr/

Can you remove those two boiler plate lines?  We all have google.

regards,
dan carpenter


  reply	other threads:[~2013-01-22  6:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 21:14 [PATCH] staging/iio: Use correct argument for sizeof Peter Huewe
2013-01-22  6:43 ` Dan Carpenter [this message]
2013-01-22  7:02   ` Dan Carpenter
2013-01-22  8:02   ` Lars-Peter Clausen
2013-01-22  8:05     ` Dan Carpenter
2013-01-22 11:58 ` Jonathan Cameron

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=20130122064351.GV4584@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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;
as well as URLs for NNTP newsgroup(s).