From f0a0be02487624a1a895b09b5e3e78f571efe3f2 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 7 Feb 2019 11:41:08 +0900 Subject: [PATCH] Remove pointless default allocation in _get_node_record() --- dbutils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dbutils.c b/dbutils.c index a7c6f172..a781f206 100644 --- a/dbutils.c +++ b/dbutils.c @@ -2044,9 +2044,7 @@ static RecordStatus _get_node_record(PGconn *conn, char *sqlquery, t_node_info *node_info, bool init_defaults) { int ntuples = 0; - PGresult *res = NULL; - - res = PQexec(conn, sqlquery); + PGresult *res = PQexec(conn, sqlquery); if (PQresultStatus(res) != PGRES_TUPLES_OK) {