[ovs-dev] [PATCH 04/15] netdev-linux: Avoid fiddling with indeterminate data.
Jesse Gross
jesse at nicira.com
Thu Feb 11 16:43:41 UTC 2010
On Wed, Feb 10, 2010 at 2:30 PM, Ben Pfaff <blp at nicira.com> wrote:
>
> @@ -1255,9 +1253,10 @@ netdev_linux_get_stats(const struct netdev *netdev_,
> int ifindex;
>
> error = get_ifindex(netdev_, &ifindex);
> - if (!error) {
> - error = get_stats_via_netlink(ifindex, collect_stats);
> + if (error) {
> + return error;
> }
> + error = get_stats_via_netlink(ifindex, collect_stats);
> } else {
> error = get_stats_via_proc(netdev_get_name(netdev_),
> collect_stats);
> }
Shouldn't we also return immediately if either of the get stats functions
fails?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100211/7e762ee0/attachment-0003.html>
More information about the dev
mailing list