aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-11-29 08:42:42 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:10 -0500
commitdf1b86c53dc56b1a3125b6792356066ac3af4254 (patch)
tree68d0f1a2e66044ea5bc047e3db8fbe4f537d425a /net/core
parentc7dc89c0ac8e7c3796bff91becf58ccdbcaf9f18 (diff)
[NET]: Nicer WARN_ON in netstat_show
The if (statement) WARN_ON(1); looks much better as WARN_ON(statement); Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net-sysfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 61ead1d11132..e41f4b9d2e7e 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -247,9 +247,8 @@ static ssize_t netstat_show(const struct device *d,
247 struct net_device_stats *stats; 247 struct net_device_stats *stats;
248 ssize_t ret = -EINVAL; 248 ssize_t ret = -EINVAL;
249 249
250 if (offset > sizeof(struct net_device_stats) || 250 WARN_ON(offset > sizeof(struct net_device_stats) ||
251 offset % sizeof(unsigned long) != 0) 251 offset % sizeof(unsigned long) != 0);
252 WARN_ON(1);
253 252
254 read_lock(&dev_base_lock); 253 read_lock(&dev_base_lock);
255 if (dev_isalive(dev) && dev->get_stats && 254 if (dev_isalive(dev) && dev->get_stats &&