summaryrefslogtreecommitdiff
path: root/ovsdb/replication.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-01-31 11:23:24 -0800
committerBen Pfaff <blp@ovn.org>2018-02-01 11:21:34 -0800
commit500db308e2704fa9fc5ff69cdcd9cb3b22116e99 (patch)
tree8a5cf13bf33232372b806bcbd48c791add83a4df /ovsdb/replication.c
parent4bc938ccb3124282c873084a7d11cd8bc37e27a7 (diff)
downloadopenvswitch-500db308e2704fa9fc5ff69cdcd9cb3b22116e99.tar.gz
util: Document and rely on ovs_assert() always evaluating its argument.
The ovs_assert() macro always evaluates its argument, even when NDEBUG is defined so that failure is ignored. This behavior wasn't documented, and thus a lot of code didn't rely on it. This commit documents the behavior and simplifies bits of code that heretofore didn't rely on it. Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Diffstat (limited to 'ovsdb/replication.c')
-rw-r--r--ovsdb/replication.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ovsdb/replication.c b/ovsdb/replication.c
index bac46c67f..fc9ce6472 100644
--- a/ovsdb/replication.c
+++ b/ovsdb/replication.c
@@ -118,10 +118,9 @@ replication_init(const char *sync_from_, const char *exclude_tables,
{
free(sync_from);
sync_from = xstrdup(sync_from_);
- char *err = set_blacklist_tables(exclude_tables, false);
/* Caller should have verified that the 'exclude_tables' is
* parseable. An error here is unexpected. */
- ovs_assert(!err);
+ ovs_assert(!set_blacklist_tables(exclude_tables, false));
replication_dbs_destroy();