* [PATCH] ethtool_ops bug
@ 2003-08-27 15:56 Matthew Wilcox
2003-08-27 21:55 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2003-08-27 15:56 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
C's switch statements need breaks. I know that.
Index: net/core/ethtool.c
===================================================================
RCS file: /var/cvs/linux-2.6/net/core/ethtool.c,v
retrieving revision 1.1
diff -u -p -r1.1 ethtool.c
--- net/core/ethtool.c 23 Aug 2003 02:47:29 -0000 1.1
+++ net/core/ethtool.c 27 Aug 2003 15:55:03 -0000
@@ -502,15 +502,15 @@ static int ethtool_get_strings(struct ne
switch (gstrings.string_set) {
case ETH_SS_TEST:
- if (ops->self_test_count)
- gstrings.len = ops->self_test_count(dev);
- else
+ if (!ops->self_test_count)
return -EOPNOTSUPP;
+ gstrings.len = ops->self_test_count(dev);
+ break;
case ETH_SS_STATS:
- if (ops->get_stats_count)
- gstrings.len = ops->get_stats_count(dev);
- else
+ if (!ops->get_stats_count)
return -EOPNOTSUPP;
+ gstrings.len = ops->get_stats_count(dev);
+ break;
default:
return -EINVAL;
}
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-27 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-27 15:56 [PATCH] ethtool_ops bug Matthew Wilcox
2003-08-27 21:55 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).