diff options
author | Ben Pfaff <blp@ovn.org> | 2016-08-31 22:03:27 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-10-19 11:38:31 -0700 |
commit | 9b03e59d208ebb65a62b2147849c574aea0bf68d (patch) | |
tree | 3c220e7e75b1243bbbae01277828141ae21fc5b9 /vswitchd | |
parent | 7e1ffe3c4136b6a100b8e1220ea1d8186667d117 (diff) | |
download | openvswitch-9b03e59d208ebb65a62b2147849c574aea0bf68d.tar.gz |
ovsdb-idlc: Use ovsdb_datum_from_smap() instead of open-coding it.
There's no reason to have three copies of this code for every smap-type
column.
The code wasn't a perfect match for ovsdb_datum_from_smap(), so this commit
also changes ovsdb_datum_from_smap() to better suit it. It only had one
caller and the new design is adequate for that caller.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index aae249d07..ff5d86fe5 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2618,6 +2618,7 @@ run_system_stats(void) txn = ovsdb_idl_txn_create(idl); ovsdb_datum_from_smap(&datum, stats); + smap_destroy(stats); ovsdb_idl_txn_write(&cfg->header_, &ovsrec_open_vswitch_col_statistics, &datum); ovsdb_idl_txn_commit(txn); |