From f7c21036f9cc592727b791f9e7bee8bc75ed7285 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 21 Feb 2011 17:02:35 -0800 Subject: [PATCH] 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 --- ovsdb/file.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ovsdb/file.c b/ovsdb/file.c index 7061d682..bf72316c 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; -- 2.30.2