Re: [PATCH] fs: Cleanup string initializations (char[] instead of char *)

Mateusz Guzik
2014-05-17T17:58:41Z

On Sat, May 17, 2014 at 06:21:09PM +0100, Al Viro wrote:
> On Sat, May 17, 2014 at 05:44:28PM +0200, Mateusz Guzik wrote:
> > This particular function would be better of with removing this variable
> > and replacing all pairs like:
> > sprintf(dp, ...);
> > dp += strlen(...)
> >
> > with:
> > dp += sprintf(dp, ...);
>
> Sigh... Premature optimisation and all such... (..)

Well, I was interested in getting rid of this error-prone style, which
results in stuff like:
sprintf(dp, "\nmask ");
dp += 6;

... and cleaning up the rest for consistency, will note next time.

I'm new to linux and didn't know about seq_ thingy, will grep some more
next time.

--
Mateusz Guzik