From: Mateusz Guzik <mguzik@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: "Manuel Schölling" <manuel.schoelling@gmx.de>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: Cleanup string initializations (char[] instead of char *)
Date: Sat, 17 May 2014 19:58:30 +0200 [thread overview]
Message-ID: <20140517175829.GD1939@mguzik.redhat.com> (raw)
In-Reply-To: <20140517172109.GH18016@ZenIV.linux.org.uk>
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
next prev parent reply other threads:[~2014-05-17 17:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 15:00 [PATCH] fs: Cleanup string initializations (char[] instead of char *) Manuel Schölling
2014-05-17 15:44 ` Mateusz Guzik
2014-05-17 17:21 ` Al Viro
2014-05-17 17:58 ` Mateusz Guzik [this message]
2014-05-17 16:53 ` Al Viro
2014-05-18 10:01 ` Manuel Schoelling
2014-05-19 1:51 ` Kevin Easton
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=20140517175829.GD1939@mguzik.redhat.com \
--to=mguzik@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manuel.schoelling@gmx.de \
--cc=viro@ZenIV.linux.org.uk \
/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.