xfs
[Top] [All Lists]

Re: [PATCH] fix spurious gcc warnings

To: "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] fix spurious gcc warnings
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 21 Nov 2008 18:12:14 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20081121230948.GZ4144@xxxxxxxxxxxxxx>
References: <20081112114738.GC15216@xxxxxxxxxxxxx> <20081121230948.GZ4144@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
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.

<Prev in Thread] Current Thread [Next in Thread>