X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ovsdb%2Ftransaction.c;h=646163a99824c164b1c30685e612617db1b35f18;hb=cb22974d773942d66da42b700b8bca0db27a0920;hp=cc890ad8d189a8424ba9cb1da83b137fd7ff0bb3;hpb=4749f73d12c844b318af7f45cf45e1acac9f7c08;p=sliver-openvswitch.git diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c index cc890ad8d..646163a99 100644 --- a/ovsdb/transaction.c +++ b/ovsdb/transaction.c @@ -17,8 +17,6 @@ #include "transaction.h" -#include - #include "bitmap.h" #include "dynamic-string.h" #include "hash.h" @@ -111,7 +109,7 @@ ovsdb_txn_create(struct ovsdb *db) static void ovsdb_txn_free(struct ovsdb_txn *txn) { - assert(list_is_empty(&txn->txn_tables)); + ovs_assert(list_is_empty(&txn->txn_tables)); ds_destroy(&txn->comment); free(txn); } @@ -807,7 +805,7 @@ ovsdb_txn_commit(struct ovsdb_txn *txn, bool durable) if (error) { /* We don't support two-phase commit so only the first replica is * allowed to report an error. */ - assert(&replica->node == txn->db->replicas.next); + ovs_assert(&replica->node == txn->db->replicas.next); ovsdb_txn_abort(txn); return error; @@ -898,7 +896,7 @@ ovsdb_txn_row_modify(struct ovsdb_txn *txn, const struct ovsdb_row *ro_row_) struct ovsdb_row *ro_row = CONST_CAST(struct ovsdb_row *, ro_row_); if (ro_row->txn_row) { - assert(ro_row == ro_row->txn_row->new); + ovs_assert(ro_row == ro_row->txn_row->new); return ro_row; } else { struct ovsdb_table *table = ro_row->table; @@ -940,7 +938,7 @@ ovsdb_txn_row_delete(struct ovsdb_txn *txn, const struct ovsdb_row *row_) if (!txn_row) { ovsdb_txn_row_create(txn, table, row, NULL); } else { - assert(txn_row->new == row); + ovs_assert(txn_row->new == row); if (txn_row->old) { txn_row->new = NULL; } else { @@ -987,7 +985,7 @@ ovsdb_txn_table_destroy(struct ovsdb_txn_table *txn_table) { size_t i; - assert(hmap_is_empty(&txn_table->txn_rows)); + ovs_assert(hmap_is_empty(&txn_table->txn_rows)); for (i = 0; i < txn_table->table->schema->n_indexes; i++) { hmap_destroy(&txn_table->txn_indexes[i]);