diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index ef8df3d098..1c356e0809 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -378,15 +378,12 @@ commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op) /* * restriction_is_or_clause * - * Returns t iff the restrictinfo node contains an 'or' clause. + * Returns true iff the restrictinfo node contains an 'or' clause. */ -bool +inline bool restriction_is_or_clause(RestrictInfo *restrictinfo) { - if (restrictinfo->orclause != NULL) - return true; - else - return false; + return (restrictinfo->orclause != NULL); } /* @@ -395,7 +392,7 @@ restriction_is_or_clause(RestrictInfo *restrictinfo) * Returns true if it's okay to evaluate this clause "early", that is before * other restriction clauses attached to the specified relation. */ -bool +inline bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, RelOptInfo *rel) { @@ -403,11 +400,8 @@ restriction_is_securely_promotable(RestrictInfo *restrictinfo, * It's okay if there are no baserestrictinfo clauses for the rel that * would need to go before this one, *or* if this one is leakproof. */ - if (restrictinfo->security_level <= rel->baserestrict_min_security || - restrictinfo->leakproof) - return true; - else - return false; + return (restrictinfo->security_level <= rel->baserestrict_min_security || + restrictinfo->leakproof); } /*