Patch for strncmp use in s390 in 2.5

Pete Zaitcev (zaitcev@redhat.com)
Wed, 28 May 2003 16:20:19 -0400


Martin & others:

I didn't see this posted before. Sorry if I missed it.
It's a harmless buglet which causes false positives with correctness
checking tools, and so annoys me.

Cheers,
-- Pete

--- linux-2.5.69-bk12/arch/s390/kernel/setup.c 2003-05-11 12:56:15.000000000 -0700
+++ linux-2.5.69-bk12-s390/arch/s390/kernel/setup.c 2003-05-28 13:01:54.000000000 -0700
@@ -165,15 +165,15 @@
static int __init conmode_setup(char *str)
{
#if defined(CONFIG_SCLP_CONSOLE)
- if (strncmp(str, "hwc", 4) == 0 || strncmp(str, "sclp", 5) == 0)
+ if (strncmp(str, "hwc", 3) == 0 || strncmp(str, "sclp", 4) == 0)
SET_CONSOLE_SCLP;
#endif
#if defined(CONFIG_TN3215_CONSOLE)
- if (strncmp(str, "3215", 5) == 0)
+ if (strncmp(str, "3215", 4) == 0)
SET_CONSOLE_3215;
#endif
#if defined(CONFIG_TN3270_CONSOLE)
- if (strncmp(str, "3270", 5) == 0)
+ if (strncmp(str, "3270", 4) == 0)
SET_CONSOLE_3270;
#endif
return 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/