diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-04-05 22:19:47 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-09 22:25:26 -0700 |
commit | e3a5cd9edff9a7a20de3c88c9d479704da98fb85 (patch) | |
tree | 2667fc69e67a58a49515e56d480ae61b984ab301 /net | |
parent | d938ab44c0c5418bb74a97b422a070e2cdccce22 (diff) | |
download | op-kernel-dev-e3a5cd9edff9a7a20de3c88c9d479704da98fb85.zip op-kernel-dev-e3a5cd9edff9a7a20de3c88c9d479704da98fb85.tar.gz |
[NET]: 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 <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/net-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 21b6846..c12990c9 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -165,7 +165,7 @@ static ssize_t show_operstate(struct class_device *dev, char *buf) 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]); |