Skip to content

Commit 8ea91ba

Browse files
author
Neil Conway
committed
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.
1 parent ce8fd39 commit 8ea91ba

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.159 2006/01/03 22:48:10 tgl Exp $
6+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.160 2006/01/10 18:50:43 neilc Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -414,8 +414,7 @@ plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo)
414414
}
415415

416416
/* Clean up any leftover temporary memory */
417-
if (estate.eval_econtext != NULL)
418-
FreeExprContext(estate.eval_econtext);
417+
FreeExprContext(estate.eval_econtext);
419418
estate.eval_econtext = NULL;
420419
exec_eval_cleanup(&estate);
421420

@@ -646,8 +645,7 @@ plpgsql_exec_trigger(PLpgSQL_function *func,
646645
}
647646

648647
/* Clean up any leftover temporary memory */
649-
if (estate.eval_econtext != NULL)
650-
FreeExprContext(estate.eval_econtext);
648+
FreeExprContext(estate.eval_econtext);
651649
estate.eval_econtext = NULL;
652650
exec_eval_cleanup(&estate);
653651

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy