Hi Andy, > Date: 2026-11-16 13:00:57+0200 > From: Andy Shevchenko > > On Sat, Nov 14, 2026 at 08:49:21PM +0100, Alejandro Colomar wrote: > > [...] > > > > And these are all candidates for converted uses to > > > whatever is the function name or steq: > > > > > > $ git grep -P '[^w]strncmp\s*\(\s*[\w\.\-\>\s]*,\s*\"\w*"\s*,\s*\d+\s*\)' -- '*.[ch]' | wc -l > > > 946 > > > > Looking at those, I've seen a bug in BCM47XX, introduced in 2224de9d152b > > (2013-10-29; "MIPS: BCM47XX: Fix clock detection for BCM5354 with 200MHz > > clock"). > > > > Look at this line of code: > > > > $ grep strncmp arch/mips/bcm47xx/time.c > > if (len >= 0 && !strncmp(buf, "200", 4)) > > > > That strncmp(3) call is wrong, as it's really behaving as strcmp(3), > > since the 4 is off-by-one. I'd like to know what was the intention. > > Was it meant to be !strncmp(buf, "200", 3)? Or was it meant to be just > > !strcmp(buf, "200")? > > When in doubts, preserve current behaviour over refactoring. Thanks! Agree. I've done that in the separate streq(3) patch set. . Have a lovely day! Alex --