diff options
author | Ben Pfaff <blp@nicira.com> | 2012-11-06 13:14:55 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-01-16 16:03:37 -0800 |
commit | cb22974d773942d66da42b700b8bca0db27a0920 (patch) | |
tree | 6412724be1bfc46d7235c4e2105c279bbe20d320 /lib/dpif-netdev.c | |
parent | 4749f73d12c844b318af7f45cf45e1acac9f7c08 (diff) |
Replace most uses of assert by ovs_assert.
This is a straight search-and-replace, except that I also removed #include
<assert.h> from each file where there were no assert calls left.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r-- | lib/dpif-netdev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 682dfc90..3d9cd85f 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -17,7 +17,6 @@ #include <config.h> #include "dpif.h" -#include <assert.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> @@ -160,7 +159,7 @@ static void dp_netdev_execute_actions(struct dp_netdev *, static struct dpif_netdev * dpif_netdev_cast(const struct dpif *dpif) { - assert(dpif->dpif_class->open == dpif_netdev_open); + ovs_assert(dpif->dpif_class->open == dpif_netdev_open); return CONTAINER_OF(dpif, struct dpif_netdev, dpif); } @@ -289,7 +288,7 @@ dpif_netdev_open(const struct dpif_class *class, const char *name, if (error) { return error; } - assert(dp != NULL); + ovs_assert(dp != NULL); } } else { if (dp->class != class) { @@ -337,7 +336,7 @@ static void dpif_netdev_close(struct dpif *dpif) { struct dp_netdev *dp = get_dp_netdev(dpif); - assert(dp->open_cnt > 0); + ovs_assert(dp->open_cnt > 0); if (--dp->open_cnt == 0 && dp->destroyed) { shash_find_and_delete(&dp_netdevs, dp->name); dp_netdev_free(dp); |