mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +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:
@@ -109,7 +109,7 @@ gtsquery_same(PG_FUNCTION_ARGS)
|
||||
TSQuerySign b = PG_GETARG_TSQUERYSIGN(1);
|
||||
bool *result = (bool *) PG_GETARG_POINTER(2);
|
||||
|
||||
*result = (a == b) ? true : false;
|
||||
*result = (a == b);
|
||||
|
||||
PG_RETURN_POINTER(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user