mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Clean up some code using "(expr) ? true : false"
All the code paths simplified here were already using a boolean or used an expression that led to zero or one, making the extra bits unnecessary. Author: Justin Pryzby Reviewed-by: Tom Lane, Michael Paquier, Peter Smith Discussion: https://postgr.es/m/20210428182936.GE27406@telsasoft.com
This commit is contained in:
@ -303,9 +303,9 @@ supportSecondarySplit(Relation r, GISTSTATE *giststate, int attno,
|
||||
penalty2 = gistpenalty(giststate, attno, entry1, false, &entrySR, false);
|
||||
|
||||
if (penalty1 < penalty2)
|
||||
leaveOnLeft = (sv->spl_ldatum_exists) ? true : false;
|
||||
leaveOnLeft = sv->spl_ldatum_exists;
|
||||
else
|
||||
leaveOnLeft = (sv->spl_rdatum_exists) ? true : false;
|
||||
leaveOnLeft = sv->spl_rdatum_exists;
|
||||
}
|
||||
|
||||
if (leaveOnLeft == false)
|
||||
|
Reference in New Issue
Block a user