Re: strange case of "if ((a & b))"

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: strange case of "if ((a & b))"
Date: 2021-05-10 06:25:08
Message-ID: YJjRxKhMXXd3O6ue@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 28, 2021 at 01:29:36PM -0500, Justin Pryzby wrote:
> These look strange to me - the inner parens don't do anything.
> I wouldn't write it with 2x parens for the same reason I wouldn't write it with
> 8x parens.

> }
> - else if ((!ctx->fast_forward))
> + else if ((!ctx->fast_forward) != 0)

I find this part of the change harder to understand.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-05-10 06:27:13 Re: strange case of "if ((a & b))"
Previous Message Fujii Masao 2021-05-10 06:17:28 Re: Inaccurate error message when set fdw batch_size to 0