mirror of
https://github.com/postgres/postgres.git
synced 2025-05-20 05:13:53 +03:00
Improve two comments related to a boolean DefElem's value
The original comments mentioned a "parameter" as something not defined in a fast-exit path to assume a true status. This is rather confusing as the parameter DefElem is defined, and the intention is to check if its value is defined. This improves both comments to mention the value assigned to the DefElem's value instead, so as future patches are able to catch the tweak if this code pattern gets copied around more. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pv0yWynWTmp4o34s0d98xVubys9fy=p0YXsZ5_sUcNnMw@mail.gmail.com
This commit is contained in:
parent
1cd1821630
commit
8445f5a21d
@ -321,7 +321,7 @@ static CopyHeaderChoice
|
|||||||
defGetCopyHeaderChoice(DefElem *def, bool is_from)
|
defGetCopyHeaderChoice(DefElem *def, bool is_from)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If no parameter given, assume "true" is meant.
|
* If no parameter value given, assume "true" is meant.
|
||||||
*/
|
*/
|
||||||
if (def->arg == NULL)
|
if (def->arg == NULL)
|
||||||
return COPY_HEADER_TRUE;
|
return COPY_HEADER_TRUE;
|
||||||
|
@ -108,7 +108,7 @@ bool
|
|||||||
defGetBoolean(DefElem *def)
|
defGetBoolean(DefElem *def)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If no parameter given, assume "true" is meant.
|
* If no parameter value given, assume "true" is meant.
|
||||||
*/
|
*/
|
||||||
if (def->arg == NULL)
|
if (def->arg == NULL)
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user