On Fri, Aug 26, 2016 at 04:15:51PM -0700, Andy Zhou wrote: > It seems odd that the currently replication implementation moves the > struct db from ovsdb-server.c (file private) to replication.h (global). > > This patch moves the 'struct db' defintion back into ovsdb-server.c, > > Signed-off-by: Andy Zhou <az...@ovn.org>
Much cleaner, thanks. Acked-by: Ben Pfaff <b...@ovn.org> I have the following suggestions. sparse complains without the () to (void) changes. --8<--------------------------cut here-------------------------->8-- diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index d4bc80b..40f8498 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. +/* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, 2016 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -497,7 +497,7 @@ find_db(const struct shash *all_dbs, const char *db_name) { struct shash_node *node; - SHASH_FOR_EACH(node, all_dbs) { + SHASH_FOR_EACH (node, all_dbs) { struct db *db = node->data; if (!strcmp(db->db->schema->name, db_name)) { return db; diff --git a/ovsdb/replication.c b/ovsdb/replication.c index 9658145..0ab7727 100644 --- a/ovsdb/replication.c +++ b/ovsdb/replication.c @@ -326,7 +326,7 @@ find_db(const char *db_name) } static struct ovsdb_error * -reset_databases() +reset_databases(void) { struct shash_node *db_node; struct ovsdb_error *error = NULL; @@ -536,7 +536,7 @@ add_monitored_table(struct ovsdb_table_schema *table, } static void -check_for_notifications() +check_for_notifications(void) { struct jsonrpc_msg *msg; int error; _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev