mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +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:
@ -1037,7 +1037,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
|
||||
if (attnum[i] <= 0 || attnum[i] > numberOfAttributes)
|
||||
break;
|
||||
v[attnum[i] - 1] = Values[i];
|
||||
n[attnum[i] - 1] = (Nulls && Nulls[i] == 'n') ? true : false;
|
||||
n[attnum[i] - 1] = (Nulls && Nulls[i] == 'n');
|
||||
}
|
||||
|
||||
if (i == natts) /* no errors in *attnum */
|
||||
|
Reference in New Issue
Block a user