瀏覽代碼

niu.c: Use correct length in strncmp

Untested, no hardware

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches 15 年之前
父節點
當前提交
9ea2bdab11
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/niu.c

+ 1 - 1
drivers/net/niu.c

@@ -8143,7 +8143,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)