public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Achim Leubner <Achim_Leubner@pmc-sierra.com>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>,
	Adaptec OEM Raid Solutions <aacraid@adaptec.com>,
	"James E.J. Bottomley" <jbottomley@parallels.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] aacraid: use lower snprintf() limit
Date: Thu, 6 Oct 2011 17:30:38 +0300	[thread overview]
Message-ID: <20111006143038.GC18470@longonot.mountain> (raw)
In-Reply-To: <FD2BDBE06AC58549AE9E16C08B45675D05D8ED9E@BBY1EXM10.pmc_nt.nt.pmc-sierra.bc.ca>

On Wed, Oct 05, 2011 at 05:19:12AM -0700, Achim Leubner wrote:
> Looks good so far. But do we really need the last two lines?
> > +	if (len > 16)
> > +		len = 16;
> 

snprintf() returns the number of characters that it _would_ have
copied if it had space.  We want to return the number of bytes
actually copied.

Again, the snprintf() values do fit so this change doesn't actually
make any difference.

regards,
dan carpenter

  reply	other threads:[~2011-10-06 14:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05  5:50 [patch] [SCSI] aacraid: use lower snprintf() limit Dan Carpenter
2011-10-05  7:35 ` Rolf Eike Beer
2011-10-05 12:19   ` Achim Leubner
2011-10-06 14:30     ` Dan Carpenter [this message]
2011-10-11 14:46       ` Achim Leubner
2011-10-06 14:27   ` Dan Carpenter
2011-10-08 10:45   ` [patch v2] " Dan Carpenter

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=20111006143038.GC18470@longonot.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=Achim_Leubner@pmc-sierra.com \
    --cc=aacraid@adaptec.com \
    --cc=eike-kernel@sf-tec.de \
    --cc=jbottomley@parallels.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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