diff mbox

[ovs-dev,7/7] ovsdb: Fix dead assignment reported by clang.

Message ID 1467176548-40488-8-git-send-email-u9012063@gmail.com
State Accepted
Headers show

Commit Message

William Tu June 29, 2016, 5:02 a.m. UTC
Clang reports variable 'error' never been used.  Fix by
returning error when table_update->type != JSON_OBJECT.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 ovsdb/replication.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/ovsdb/replication.c b/ovsdb/replication.c
index 3d1bc33..a5f94da 100644
--- a/ovsdb/replication.c
+++ b/ovsdb/replication.c
@@ -470,6 +470,7 @@  process_table_update(struct json *table_update, const char *table_name,
     if (table_update->type != JSON_OBJECT) {
         error = ovsdb_error("Not a JSON object",
                             "<table-update> for table is not object");
+        return error;
     }
 
     table = ovsdb_get_table(database, table_name);