Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda - Replace strnicmp with strncasecmp

The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.

To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Rasmus Villemoes and committed by
Takashi Iwai
8bb1ffdf 941a74ca

+1 -1
+1 -1
sound/pci/hda/hda_sysfs.c
··· 514 514 515 515 static inline int strmatch(const char *a, const char *b) 516 516 { 517 - return strnicmp(a, b, strlen(b)) == 0; 517 + return strncasecmp(a, b, strlen(b)) == 0; 518 518 } 519 519 520 520 /* parse the contents after the line "[codec]"