Use macro for fixed strnicmp string length. --- diff/drivers/md/dm-mpath.c 2004-10-29 20:23:25.000000000 +0100 +++ source/drivers/md/dm-mpath.c 2004-10-29 20:23:07.000000000 +0100 @@ -925,6 +925,8 @@ return 0; } +#define MESG_STR(x) x, sizeof(x) + static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) { int r; @@ -935,13 +937,13 @@ if (argc != 2) goto error; - if (!strnicmp(argv[0], "disable_group", 14)) + if (!strnicmp(argv[0], MESG_STR("disable_group"))) return bypass_pg_num(m, argv[1], 1); - else if (!strnicmp(argv[0], "enable_group", 13)) + else if (!strnicmp(argv[0], MESG_STR("enable_group"))) return bypass_pg_num(m, argv[1], 0); - else if (!strnicmp(argv[0], "reinstate_path", 10)) + else if (!strnicmp(argv[0], MESG_STR("reinstate_path"))) action = reinstate_path; - else if (!strnicmp(argv[0], "fail_path", 5)) + else if (!strnicmp(argv[0], MESG_STR("fail_path"))) action = fail_path; else goto error; @@ -965,6 +967,8 @@ return -EINVAL; } +#undef MESG_STR + /*----------------------------------------------------------------- * Module setup *---------------------------------------------------------------*/