mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
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>
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -50,6 +49,7 @@
|
||||
#include "socket-util.h"
|
||||
#include "shash.h"
|
||||
#include "svec.h"
|
||||
#include "util.h"
|
||||
#include "vlog.h"
|
||||
|
||||
VLOG_DEFINE_THIS_MODULE(netdev_bsd);
|
||||
@@ -157,14 +157,15 @@ is_netdev_bsd_class(const struct netdev_class *netdev_class)
|
||||
static struct netdev_bsd *
|
||||
netdev_bsd_cast(const struct netdev *netdev)
|
||||
{
|
||||
assert(is_netdev_bsd_class(netdev_dev_get_class(netdev_get_dev(netdev))));
|
||||
ovs_assert(is_netdev_bsd_class(netdev_dev_get_class(
|
||||
netdev_get_dev(netdev))));
|
||||
return CONTAINER_OF(netdev, struct netdev_bsd, netdev);
|
||||
}
|
||||
|
||||
static struct netdev_dev_bsd *
|
||||
netdev_dev_bsd_cast(const struct netdev_dev *netdev_dev)
|
||||
{
|
||||
assert(is_netdev_bsd_class(netdev_dev_get_class(netdev_dev)));
|
||||
ovs_assert(is_netdev_bsd_class(netdev_dev_get_class(netdev_dev)));
|
||||
return CONTAINER_OF(netdev_dev, struct netdev_dev_bsd, netdev_dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user