Re: strange case of "if ((a & b))" - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: strange case of "if ((a & b))"
Date
Msg-id YJjRxKhMXXd3O6ue@paquier.xyz
Whole thread Raw
In response to strange case of "if ((a & b))"  (Justin Pryzby <pryzby@telsasoft.com>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Inaccurate error message when set fdw batch_size to 0
Next
From: Tom Lane
Date:
Subject: Re: Inaccurate error message when set fdw batch_size to 0