Skip to contentSkip to conversation

parport_pc.c: Use correct length in strncmp

PATCH In review Joe Perches 2 participants 2 messages Nov 10, 2009 Parallel port

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parport_pc.c: Use correct length in strncmp

drivers/parport/parport_pc.c +1 -1
index 2597145..ad113b0 100644
@@ -3403,7 +3403,7 @@ static int __init parport_parse_param(const char *s, int *val,
 		*val = automatic;
 	else if (!strncmp(s, "none", 4))
 		*val = none;
-	else if (nofifo && !strncmp(s, "nofifo", 4))
+	else if (nofifo && !strncmp(s, "nofifo", 6))
 		*val = nofifo;
 	else {
 		char *ep;
Acked-by on v1 1/1
#1 lore raw

drivers/parport/parport_pc.c static int __init parport_parse_param(const char *s, int *val, · line 3407

Quoted 13 lines · On Mon, 09 Nov 2009 19:51:23 -0800 Joe Perches <[email protected]> wrote:
drivers/parport/parport_pc.c +1 -1
index 2597145..ad113b0 100644
@@ -3403,7 +3403,7 @@ static int __init parport_parse_param(const char *s, int *val,
 		*val = automatic;
 	else if (!strncmp(s, "none", 4))
 		*val = none;
-	else if (nofifo && !strncmp(s, "nofifo", 4))
+	else if (nofifo && !strncmp(s, "nofifo", 6))
 		*val = nofifo;

I just hope nobody is booting with =nofif due to a typo ;)