net/core/net-sysfs.c: fix an off-by-21-or-49 error
Subsystems (2)
PATCH 1/1 net/core/net-sysfs.c: fix an off-by-21-or-49 error
This patch fixes an off-by-21-or-49 error ;-) spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
net/core/net-sysfs.c renamed from net/core/net-sysfs.c.old +1 -1
@@ -165,7 +165,7 @@ static ssize_t show_operstate(struct cla operstate =IF_OPER_DOWN ;read_unlock (&dev_base_lock); -if (operstate >=sizeof (operstates)) +if (operstate >=ARRAY_SIZE (operstates))return -EINVAL ;/* should not happen */ return sprintf (buf,"%s\n" , operstates[operstate]);
From: Adrian Bunk <[email protected]>
Date: Tue, 4 Apr 2006 21:07:42 +0200
Quoted 4 lines
This patch fixes an off-by-21-or-49 error ;-) spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
Applied, thanks Adrian.