[ovs-dev] [Simple DB Stats 05/11] ovsdb-idl: Drop unnecessary allocation from ovsdb_idl_txn_insert().

Ben Pfaff blp at nicira.com
Fri Jun 11 00:14:35 UTC 2010


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.
---
 lib/ovsdb-idl.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 23d00a8..1bd953c 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -1509,7 +1509,6 @@ ovsdb_idl_txn_insert(struct ovsdb_idl_txn *txn,
     uuid_generate(&row->uuid);
     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;
-- 
1.7.1





More information about the dev mailing list