From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 24/25] sound: Use static const char arrays
Date: Mon, 13 Sep 2010 22:30:11 +0200 [thread overview]
Message-ID: <s5h1v8xl73g.wl%tiwai@suse.de> (raw)
In-Reply-To: <d0ef4062f24ff95c6f7d44a9123e19c17e712744.1284406639.git.joe@perches.com>
At Mon, 13 Sep 2010 12:48:02 -0700,
Joe Perches wrote:
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> sound/core/misc.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/core/misc.c b/sound/core/misc.c
> index 2c41825..0e5e77f 100644
> --- a/sound/core/misc.c
> +++ b/sound/core/misc.c
> @@ -64,12 +64,15 @@ static int print_snd_pfx(unsigned int level, const char *path, int line,
> const char *format)
> {
> const char *file = sanity_file_name(path);
> - char tmp[] = "<0>";
> + char tmp[sizeof("<0>")];
> const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
> int ret = 0;
>
> if (format[0] == '<' && format[2] == '>') {
> + tmp[0] = '<';
> tmp[1] = format[1];
> + tmp[2] = '>';
> + tmp[3] = 0;
> pfx = tmp;
> ret = 1;
> }
Would this case save something really...?
thanks,
Takashi
next prev parent reply other threads:[~2010-09-13 20:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 19:47 [PATCH 00/25] treewide-next: Use static const char arrays Joe Perches
2010-09-13 19:48 ` [PATCH 24/25] sound: " Joe Perches
2010-09-13 20:30 ` Takashi Iwai [this message]
2010-09-13 20:47 ` Joe Perches
2010-09-13 21:33 ` Takashi Iwai
2010-09-14 9:14 ` (unknown) David Howells
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=s5h1v8xl73g.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=joe@perches.com \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).