1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +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:
Michael Paquier
2021-09-08 09:44:04 +09:00
parent d6c916f020
commit fd0625c7a9
22 changed files with 25 additions and 25 deletions

View File

@ -137,7 +137,7 @@ ltree_same(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(result);
if (LTG_ISONENODE(a))
*result = (ISEQ(LTG_NODE(a), LTG_NODE(b))) ? true : false;
*result = ISEQ(LTG_NODE(a), LTG_NODE(b));
else
{
int32 i;