[alsa-devel] [PATCH] ASoC: core: No need to use strncmp()

Mark Brown broonie at kernel.org
Wed Jul 31 13:01:47 CEST 2013

On Wed, Jul 31, 2013 at 10:48:14AM +0100, Dimitris Papastamos wrote:
> On Wed, Jul 31, 2013 at 10:07:26AM +0100, Mark Brown wrote:
> > On Wed, Jul 31, 2013 at 09:44:13AM +0100, Dimitris Papastamos wrote:
> > > Signed-off-by: Dimitris Papastamos <dp at opensource.wolfsonmicro.com>

> > Why?

> Hm, strncmp() suggests that we might not care about the entire string.
> Although trivial, I thought strcmp() is clearer in this context.

One of the reasons we use strncmp() here is to avoid going beyond the
end of the fixed size buffer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130731/d579f190/attachment.sig>

More information about the Alsa-devel mailing list