From: Ben Pfaff Date: Mon, 1 Nov 2010 17:47:29 +0000 (-0700) Subject: netdev-linux: Remove counter double-increments. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4e2e60be455af4d5bd294cfe19a7cb4ea13a9ff;p=openvswitch netdev-linux: Remove counter double-increments. A few coverage counters were incremented both in netdev generic code and in netdev_linux code. This commit drops the increments from the lower-level code. (This is not an actual bug because these counters are used only for logging.) --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 39e21bc6..d04eb715 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1059,8 +1059,6 @@ netdev_linux_get_stats(const struct netdev *netdev_, static int use_netlink_stats = -1; int error; - COVERAGE_INC(netdev_get_stats); - if (netdev_dev->have_vport_stats || !(netdev_dev->cache_valid & VALID_HAVE_VPORT_STATS)) { @@ -1875,7 +1873,6 @@ netdev_linux_add_router(struct netdev *netdev OVS_UNUSED, struct in_addr router) make_in4_sockaddr(&rt.rt_gateway, router); make_in4_sockaddr(&rt.rt_genmask, any); rt.rt_flags = RTF_UP | RTF_GATEWAY; - COVERAGE_INC(netdev_add_router); error = ioctl(af_inet_sock, SIOCADDRT, &rt) < 0 ? errno : 0; if (error) { VLOG_WARN("ioctl(SIOCADDRT): %s", strerror(error));