X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev.c;h=0a2e7c51edc9544147905c300a7182839c348086;hb=cb22974d773942d66da42b700b8bca0db27a0920;hp=057a7264101a70ad328e9c78ff23ef1b91d27c43;hpb=4749f73d12c844b318af7f45cf45e1acac9f7c08;p=sliver-openvswitch.git diff --git a/lib/netdev.c b/lib/netdev.c index 057a72641..0a2e7c51e 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -17,7 +17,6 @@ #include #include "netdev.h" -#include #include #include #include @@ -228,7 +227,7 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp) if (error) { return error; } - assert(netdev_dev->netdev_class == class); + ovs_assert(netdev_dev->netdev_class == class); } @@ -309,7 +308,7 @@ netdev_close(struct netdev *netdev) if (netdev) { struct netdev_dev *netdev_dev = netdev_get_dev(netdev); - assert(netdev_dev->ref_cnt); + ovs_assert(netdev_dev->ref_cnt); netdev_dev->ref_cnt--; netdev_uninit(netdev, true); @@ -404,8 +403,8 @@ netdev_recv(struct netdev *netdev, struct ofpbuf *buffer) int (*recv)(struct netdev *, void *, size_t); int retval; - assert(buffer->size == 0); - assert(ofpbuf_tailroom(buffer) >= ETH_TOTAL_MIN); + ovs_assert(buffer->size == 0); + ovs_assert(ofpbuf_tailroom(buffer) >= ETH_TOTAL_MIN); recv = netdev_get_dev(netdev)->netdev_class->recv; retval = (recv @@ -1316,7 +1315,7 @@ void netdev_dev_init(struct netdev_dev *netdev_dev, const char *name, const struct netdev_class *netdev_class) { - assert(!shash_find(&netdev_dev_shash, name)); + ovs_assert(!shash_find(&netdev_dev_shash, name)); memset(netdev_dev, 0, sizeof *netdev_dev); netdev_dev->netdev_class = netdev_class; @@ -1336,7 +1335,7 @@ netdev_dev_uninit(struct netdev_dev *netdev_dev, bool destroy) { char *name = netdev_dev->name; - assert(!netdev_dev->ref_cnt); + ovs_assert(!netdev_dev->ref_cnt); shash_delete(&netdev_dev_shash, netdev_dev->node);