aboutsummaryrefslogtreecommitdiff
path: root/src/backend/statistics/mcv.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-10-11 09:36:42 +0900
committerMichael Paquier <michael@paquier.xyz>2021-10-11 09:36:42 +0900
commit68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09 (patch)
tree444cc4fc9daae20d15c706655f89154a7a359367 /src/backend/statistics/mcv.c
parent3eb1f4d09745433c70ccac411cad24d0374b9c3b (diff)
downloadpostgresql-68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09.tar.gz
postgresql-68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09.zip
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
Diffstat (limited to 'src/backend/statistics/mcv.c')
-rw-r--r--src/backend/statistics/mcv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c
index 35b39ece075..b350fc5f7b2 100644
--- a/src/backend/statistics/mcv.c
+++ b/src/backend/statistics/mcv.c
@@ -1619,8 +1619,7 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses,
Assert(mcvlist->nitems <= STATS_MCVLIST_MAX_ITEMS);
matches = palloc(sizeof(bool) * mcvlist->nitems);
- memset(matches, (is_or) ? false : true,
- sizeof(bool) * mcvlist->nitems);
+ memset(matches, !is_or, sizeof(bool) * mcvlist->nitems);
/*
* Loop through the list of clauses, and for each of them evaluate all the