aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2006-01-10 18:50:43 +0000
committerNeil Conway <neilc@samurai.com>2006-01-10 18:50:43 +0000
commit8ea91ba18ebc52d91ebb856e75d363d7d552a38b (patch)
tree0fd901fc4a26d70a96209156d1c18b981db3302e /src
parentce8fd39e15894da00e1e209c47eb0936265227c5 (diff)
downloadpostgresql-8ea91ba18ebc52d91ebb856e75d363d7d552a38b.tar.gz
postgresql-8ea91ba18ebc52d91ebb856e75d363d7d552a38b.zip
Minor code clarity improvement: AFAICS, estate.eval_econtext must be
non-NULL during the guts of plpgsql_exec_trigger() and plpgsql_exec_function(). Therefore, we can remove the NULL check, per discussion on -patches.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 5ae280eaf7d..e28e74e3996 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.159 2006/01/03 22:48:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.160 2006/01/10 18:50:43 neilc Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -414,8 +414,7 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo)
}
/* Clean up any leftover temporary memory */
- if (estate.eval_econtext != NULL)
- FreeExprContext(estate.eval_econtext);
+ FreeExprContext(estate.eval_econtext);
estate.eval_econtext = NULL;
exec_eval_cleanup(&estate);
@@ -646,8 +645,7 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
}
/* Clean up any leftover temporary memory */
- if (estate.eval_econtext != NULL)
- FreeExprContext(estate.eval_econtext);
+ FreeExprContext(estate.eval_econtext);
estate.eval_econtext = NULL;
exec_eval_cleanup(&estate);