X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-idl.c;h=534beb02cf404d811228f0f9cedde95daff8202a;hb=25f78c28faf4f3e059a006c8423b701fe9e9e77c;hp=3d4cbd44867206462efc64e3dbe3af6acdd9485e;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=openvswitch diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 3d4cbd44..534beb02 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -906,6 +906,7 @@ static struct ovsdb_idl_row * ovsdb_idl_row_create__(const struct ovsdb_idl_table_class *class) { struct ovsdb_idl_row *row = xzalloc(class->allocation_size); + class->row_init(row); list_init(&row->src_arcs); list_init(&row->dst_arcs); hmap_node_nullify(&row->txn_node); @@ -1819,7 +1820,7 @@ ovsdb_idl_txn_write(const struct ovsdb_idl_row *row_, const struct ovsdb_idl_column *column, struct ovsdb_datum *datum) { - struct ovsdb_idl_row *row = (struct ovsdb_idl_row *) row_; + struct ovsdb_idl_row *row = CONST_CAST(struct ovsdb_idl_row *, row_); const struct ovsdb_idl_table_class *class; size_t column_idx; @@ -1906,7 +1907,7 @@ void ovsdb_idl_txn_verify(const struct ovsdb_idl_row *row_, const struct ovsdb_idl_column *column) { - struct ovsdb_idl_row *row = (struct ovsdb_idl_row *) row_; + struct ovsdb_idl_row *row = CONST_CAST(struct ovsdb_idl_row *, row_); const struct ovsdb_idl_table_class *class; size_t column_idx; @@ -1945,7 +1946,7 @@ ovsdb_idl_txn_verify(const struct ovsdb_idl_row *row_, void ovsdb_idl_txn_delete(const struct ovsdb_idl_row *row_) { - struct ovsdb_idl_row *row = (struct ovsdb_idl_row *) row_; + struct ovsdb_idl_row *row = CONST_CAST(struct ovsdb_idl_row *, row_); if (ovsdb_idl_row_is_synthetic(row)) { return;