summaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2011-02-21 17:02:35 -0800
committerJustin Pettit <jpettit@nicira.com>2011-02-22 10:14:53 -0800
commitf7c21036f9cc592727b791f9e7bee8bc75ed7285 (patch)
treeaa8a6bc581ad28287950030feaafc62dd2b9062a /ovsdb
parent08871bf6f0ac5dd8afc6a571b43e7948de4ac832 (diff)
downloadopenvswitch-f7c21036f9cc592727b791f9e7bee8bc75ed7285.tar.gz
ovsdb: Don't check "date" before assignment in ovsdb_file_txn_from_json().
There's no indication that "date" is optional in the description of ovsdb_file_txn_from_json(), and the one caller always passes it in, so don't bother checking whether it exists. Coverity #10732
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c
index 7061d6820..bf72316cc 100644
--- a/ovsdb/file.c
+++ b/ovsdb/file.c
@@ -404,9 +404,7 @@ ovsdb_file_txn_from_json(struct ovsdb *db, const struct json *json,
if (!table) {
if (!strcmp(table_name, "_date")
&& node_json->type == JSON_INTEGER) {
- if (date) {
- *date = json_integer(node_json);
- }
+ *date = json_integer(node_json);
continue;
} else if (!strcmp(table_name, "_comment") || converting) {
continue;