[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 09 Nov 2009 20:05:45 -0800
From: Joe Perches <joe@...ches.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: [PATCH] niu.c: Use correct length in strncmp
Untested, no hardware
Signed-off-by: Joe Perches <joe@...ches.com>
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index d6c7ac6..d0f96bc 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists