Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

strcasecmp: Optimize size and speed

Applies changes similar to strncasecmp in 64c0cfb0.

Change-Id: I5f80b0031dd12c58d982578f5c5224c7f59cd915

authored by

Roman Artiukhin and committed by
Solomon Peachy
e08b8fcc 3e92a116

+7 -5
+7 -5
firmware/common/strcasecmp.c
··· 5 5 #ifndef strcasecmp 6 6 int strcasecmp(const char *s1, const char *s2) 7 7 { 8 - while (*s1 != '\0' && tolower(*s1) == tolower(*s2)) { 9 - s1++; 10 - s2++; 8 + int d, c1, c2; 9 + do 10 + { 11 + c1 = tolower(*s1++); 12 + c2 = tolower(*s2++); 11 13 } 12 - 13 - return tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2); 14 + while ((d = c1 - c2) == 0 && c1 && c2); 15 + return d; 14 16 } 15 17 #endif 16 18