From 68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 11 Oct 2021 09:36:42 +0900 Subject: Clean up more code using "(expr) ? true : false" This is similar to fd0625c, taking care of any remaining code paths that are worth the cleanup. This also changes some cases using opposite expression patterns. Author: Justin Pryzby, Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoCdF8dnUvr-BUWWGvA_XhKSoANacBMZb6jKyCk4TYfQ2Q@mail.gmail.com --- src/backend/executor/nodeResult.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/executor') diff --git a/src/backend/executor/nodeResult.c b/src/backend/executor/nodeResult.c index 0946af0a549..a8d308c6602 100644 --- a/src/backend/executor/nodeResult.c +++ b/src/backend/executor/nodeResult.c @@ -195,7 +195,7 @@ ExecInitResult(Result *node, EState *estate, int eflags) resstate->ps.ExecProcNode = ExecResult; resstate->rs_done = false; - resstate->rs_checkqual = (node->resconstantqual == NULL) ? false : true; + resstate->rs_checkqual = (node->resconstantqual != NULL); /* * Miscellaneous initialization @@ -260,7 +260,7 @@ void ExecReScanResult(ResultState *node) { node->rs_done = false; - node->rs_checkqual = (node->resconstantqual == NULL) ? false : true; + node->rs_checkqual = (node->resconstantqual != NULL); /* * If chgParam of subnode is not null then plan will be re-scanned by -- cgit v1.2.3