2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovsdb-idl: Drop unnecessary allocation from ovsdb_idl_txn_insert().

There's no need to allocate row->written ahead of time because the code
that can use it allocates it on demand if row->written is NULL.
This commit is contained in:
Ben Pfaff
2010-06-10 14:09:51 -07:00
parent 2ce42c885a
commit cde3f1eebc

View File

@@ -1517,7 +1517,6 @@ ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn,
row->table = ovsdb_idl_table_from_class(txn->idl, class);
row->new = xmalloc(class->n_columns * sizeof *row->new);
row->written = bitmap_allocate(class->n_columns);
hmap_insert(&row->table->rows, &row->hmap_node, uuid_hash(&row->uuid));
hmap_insert(&txn->txn_rows, &row->txn_node, uuid_hash(&row->uuid));
return row;