Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df1b86c53dc56b1a3125b6792356066ac3af4254 Commit: df1b86c53dc56b1a3125b6792356066ac3af4254 Parent: c7dc89c0ac8e7c3796bff91becf58ccdbcaf9f18 Author: Pavel Emelyanov <[EMAIL PROTECTED]> AuthorDate: Fri Nov 30 00:42:42 2007 +1100 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Mon Jan 28 14:55:10 2008 -0800
[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 <[EMAIL PROTECTED]> Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/core/net-sysfs.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 61ead1d..e41f4b9 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, struct net_device_stats *stats; ssize_t ret = -EINVAL; - if (offset > sizeof(struct net_device_stats) || - offset % sizeof(unsigned long) != 0) - WARN_ON(1); + WARN_ON(offset > sizeof(struct net_device_stats) || + offset % sizeof(unsigned long) != 0); read_lock(&dev_base_lock); if (dev_isalive(dev) && dev->get_stats && - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html