From: Isaac Morland <isaac.morl...@gmail.com> Sent: Tuesday, 1 October 2019 
11:32 PM

>Typical Example:
>Before:
>        Datum           values[Natts_pg_attribute];
>        bool            nulls[Natts_pg_attribute];
>        ...
>        memset(values, 0, sizeof(values));
>        memset(nulls, false, sizeof(nulls));
>After:
>        Datum           values[Natts_pg_attribute] = {0};
>        bool            nulls[Natts_pg_attribute] = {0};
>
>I hope you'll forgive a noob question. Why does the "After" initialization for 
>the boolean array have {0} rather than {false}? 

It is a valid question. 

I found that the original memsets that this patch replaces were already using 0 
and false interchangeably. So I just picked one. 
Reasons I chose {0} over {false} are: (a) laziness, and (b) consistency with 
the values[] initialiser.

But it is no problem to change the bool initialisers to {false} if that becomes 
a committer review issue.

Kind Regards
--
Peter Smith
Fujitsu Australia

Reply via email to