Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] ALSA: Warn when control names are truncated
Date: Wed, 29 Oct 2008 15:55:13 +0100	[thread overview]
Message-ID: <s5h8ws7moxa.wl%tiwai@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0810291548310.12044@tm8103.perex-int.cz>

At Wed, 29 Oct 2008 15:51:40 +0100 (CET),
Jaroslav Kysela wrote:
> 
> On Wed, 29 Oct 2008, Takashi Iwai wrote:
> 
> > At Wed, 29 Oct 2008 14:40:30 +0000,
> > Mark Brown wrote:
> > > 
> > > This is likely to confuse user interfaces since the end of the control
> > > name is interpreted (eg, "Volume", "Switch").
> > > 
> > > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > 
> > Thanks, applied now.
> > 
> > 
> > > +		if (strcmp(ncontrol->name, kctl.id.name) != 0)
> 
> Maybe better is to just use end char comparsion to save few CPU ticks:
> 
> if (kctl.id.name[sizeof(kctl.id.name)-2] != '\0' &&
>     ncontrol->name[sizeof(kctl.id.name)-1] != '\0')

No, this may cause segfault (and way too hacky to understand what's
the purpose of the code...)


Takashi

  reply	other threads:[~2008-10-29 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 14:40 [PATCH] ALSA: Warn when control names are truncated Mark Brown
2008-10-29 14:46 ` Takashi Iwai
2008-10-29 14:51   ` Jaroslav Kysela
2008-10-29 14:55     ` Takashi Iwai [this message]
2008-10-29 18:31       ` Jaroslav Kysela
2008-10-29 19:00         ` Takashi Iwai
2008-10-29 14:55     ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2008-10-29 14:14 Mark Brown
2008-10-29 14:28 ` Takashi Iwai
2008-10-29 14:33   ` Mark Brown

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=s5h8ws7moxa.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=perex@perex.cz \
    /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