Skip to contentSkip to conversation

niu.c: Use correct length in strncmp

PATCH Applied Joe Perches 2 participants 2 messages Nov 10, 2009 – Nov 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Untested, no hardware

drivers/net/niu.c +1 -1
index d6c7ac6..d0f96bc 100644
@@ -8144,7 +8144,7 @@ static void __devinit niu_vpd_parse_version(struct niu *np)
 	int i;
 
 	for (i = 0; i < len - 5; i++) {
-		if (!strncmp(s + i, "FCode ", 5))
+		if (!strncmp(s + i, "FCode ", 6))
 			break;
 	}
 	if (i >= len - 5)