#include <config.h>
-#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
char *equals;
int has_arg;
- assert(name[0] == '-' && name[1] == '-' && name[2]);
+ ovs_assert(name[0] == '-' && name[1] == '-' && name[2]);
name += 2;
equals = strchr(name, '=');
o = find_option(name, options, n_options);
if (o) {
- assert(o - options >= n_global_long_options);
- assert(o->has_arg == has_arg);
+ ovs_assert(o - options >= n_global_long_options);
+ ovs_assert(o->has_arg == has_arg);
} else {
o = add_option(&options, &n_options, &allocated_options);
o->name = xstrdup(name);
static void
del_cached_bridge(struct vsctl_context *ctx, struct vsctl_bridge *br)
{
- assert(list_is_empty(&br->ports));
- assert(hmap_is_empty(&br->children));
+ ovs_assert(list_is_empty(&br->ports));
+ ovs_assert(hmap_is_empty(&br->children));
if (br->parent) {
hmap_remove(&br->parent->children, &br->children_node);
}
static void
del_cached_port(struct vsctl_context *ctx, struct vsctl_port *port)
{
- assert(list_is_empty(&port->ifaces));
+ ovs_assert(list_is_empty(&port->ifaces));
list_remove(&port->ports_node);
shash_find_and_delete(&ctx->ports, port->port_cfg->name);
ovsrec_port_delete(port->port_cfg);
{
struct vsctl_bridge *br;
- assert(ctx->cache_valid);
+ ovs_assert(ctx->cache_valid);
br = shash_find_data(&ctx->bridges, name);
if (must_exist && !br) {
{
struct vsctl_port *port;
- assert(ctx->cache_valid);
+ ovs_assert(ctx->cache_valid);
port = shash_find_data(&ctx->ports, name);
if (port && !strcmp(name, port->bridge->name)) {
{
struct vsctl_iface *iface;
- assert(ctx->cache_valid);
+ ovs_assert(ctx->cache_valid);
iface = shash_find_data(&ctx->ifaces, name);
if (iface && !strcmp(name, iface->port->bridge->name)) {
char *column_name;
char *error;
- assert(!(operatorp && !valuep));
+ ovs_assert(!(operatorp && !valuep));
*keyp = NULL;
if (valuep) {
*valuep = NULL;
(c->syntax->prerequisites)(&ctx);
vsctl_context_done(&ctx, c);
- assert(!c->output.string);
- assert(!c->table);
+ ovs_assert(!c->output.string);
+ ovs_assert(!c->table);
}
}
}