Skip to content

Commit

Permalink
ovsdb: Fix dead assignment reported by clang.
Browse files Browse the repository at this point in the history
Clang reports variable 'error' never been used.  Fix by
returning error when table_update->type != JSON_OBJECT.

Signed-off-by: William Tu <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
williamtu authored and blp committed Jul 3, 2016
1 parent ed46c52 commit 43898d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovsdb/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ process_table_update(struct json *table_update, const char *table_name,
struct ovsdb_error *error;

if (table_update->type != JSON_OBJECT) {
error = ovsdb_error("Not a JSON object",
"<table-update> for table is not object");
return ovsdb_error("Not a JSON object",
"<table-update> for table is not object");
}

table = ovsdb_get_table(database, table_name);
Expand Down

0 comments on commit 43898d4

Please sign in to comment.