From: Justin Pettit Date: Tue, 22 Feb 2011 01:02:35 +0000 (-0800) Subject: ovsdb: Don't check "date" before assignment in ovsdb_file_txn_from_json(). X-Git-Tag: v1.1.0~250 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f7c21036f9cc592727b791f9e7bee8bc75ed7285;p=sliver-openvswitch.git 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 --- 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;