summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMichael Paquier2021-10-11 00:36:42 +0000
committerMichael Paquier2021-10-11 00:36:42 +0000
commit68f7c4b57a27dbcd3e93ba3ff7b0b49664b25e09 (patch)
tree444cc4fc9daae20d15c706655f89154a7a359367 /contrib
parent3eb1f4d09745433c70ccac411cad24d0374b9c3b (diff)
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 'contrib')
-rw-r--r--contrib/ltree/ltree_op.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/ltree/ltree_op.c b/contrib/ltree/ltree_op.c
index 778dbf1e98..da1db5fcd2 100644
--- a/contrib/ltree/ltree_op.c
+++ b/contrib/ltree/ltree_op.c
@@ -91,42 +91,42 @@ Datum
ltree_lt(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res < 0) ? true : false);
+ PG_RETURN_BOOL(res < 0);
}
Datum
ltree_le(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res <= 0) ? true : false);
+ PG_RETURN_BOOL(res <= 0);
}
Datum
ltree_eq(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res == 0) ? true : false);
+ PG_RETURN_BOOL(res == 0);
}
Datum
ltree_ge(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res >= 0) ? true : false);
+ PG_RETURN_BOOL(res >= 0);
}
Datum
ltree_gt(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res > 0) ? true : false);
+ PG_RETURN_BOOL(res > 0);
}
Datum
ltree_ne(PG_FUNCTION_ARGS)
{
RUNCMP;
- PG_RETURN_BOOL((res != 0) ? true : false);
+ PG_RETURN_BOOL(res != 0);
}
Datum