aboutsummaryrefslogtreecommitdiff
path: root/lib/netlink-socket.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-11-06 13:14:55 -0800
committerBen Pfaff <blp@nicira.com>2013-01-16 16:03:37 -0800
commitcb22974d773942d66da42b700b8bca0db27a0920 (patch)
tree6412724be1bfc46d7235c4e2105c279bbe20d320 /lib/netlink-socket.c
parent4749f73d12c844b318af7f45cf45e1acac9f7c08 (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/netlink-socket.c')
-rw-r--r--lib/netlink-socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index 49a8493e..847f11f1 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -16,7 +16,6 @@
#include <config.h>
#include "netlink-socket.h"
-#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
@@ -242,7 +241,7 @@ nl_sock_join_mcgroup(struct nl_sock *sock, unsigned int multicast_group)
int
nl_sock_leave_mcgroup(struct nl_sock *sock, unsigned int multicast_group)
{
- assert(!sock->dump);
+ ovs_assert(!sock->dump);
if (setsockopt(sock->fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP,
&multicast_group, sizeof multicast_group) < 0) {
VLOG_WARN("could not leave multicast group %u (%s)",
@@ -333,7 +332,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, bool wait)
struct msghdr msg;
ssize_t retval;
- assert(buf->allocated >= sizeof *nlmsghdr);
+ ovs_assert(buf->allocated >= sizeof *nlmsghdr);
ofpbuf_clear(buf);
iov[0].iov_base = buf->base;
@@ -881,7 +880,7 @@ nl_dump_done(struct nl_dump *dump)
while (!dump->status) {
struct ofpbuf reply;
if (!nl_dump_next(dump, &reply)) {
- assert(dump->status);
+ ovs_assert(dump->status);
}
}
@@ -1100,7 +1099,7 @@ nl_lookup_genl_family(const char *name, int *number)
}
ofpbuf_delete(reply);
- assert(*number != 0);
+ ovs_assert(*number != 0);
}
return *number > 0 ? 0 : -*number;
}