All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH] fix spurious gcc warnings
Date: Fri, 21 Nov 2008 18:12:14 -0500	[thread overview]
Message-ID: <20081121231214.GA25602@infradead.org> (raw)
In-Reply-To: <20081121230948.GZ4144@josefsipek.net>

On Fri, Nov 21, 2008 at 06:09:48PM -0500, Josef 'Jeff' Sipek wrote:
> >  	for (i=j=len = 0; i < ARRAY_SIZE(xstats); i++) {
> > -		len += sprintf(buffer + len, xstats[i].desc);
> > +		len += sprintf(buffer + len, "%s", xstats[i].desc);
> 
> Why not use strcpy here?

I applies the principle of minimal change.  strcpy would work, too and
be a tidbit more efficient.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2008-11-21 23:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 11:47 [PATCH] fix spurious gcc warnings Christoph Hellwig
2008-11-21 18:05 ` Eric Sandeen
2008-11-21 23:09 ` Josef 'Jeff' Sipek
2008-11-21 23:12   ` Christoph Hellwig [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=20081121231214.GA25602@infradead.org \
    --to=hch@infradead.org \
    --cc=jeffpc@josefsipek.net \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.