mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user