[PATCH] Fix expressions always false

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: [PATCH] Fix expressions always false
Date: 2019-12-19 23:29:39
Message-ID: CAEudQApuAr22CUqg5=-g9-vFyoaKyfSf95W-0gCU5rWn837m4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

More about expressions always false.
1. /src/backend/executor/execExprInterp.c
ndims <= 0 neve be negative, because ndims aways is added up +1
2. src/backend/utils/adt/formatting.c
result is declared long. Comparison with int limits is always false.
3. src/backend/utils/adt/jsonfuncs.c
lindex is declared long. . Comparison with int limits is always false.
4. src/backend/utils/adt/network.c
ip_addrsize is macro and awlays return 4 or 16

regards,
Ranier Vilela

Attachment Content-Type Size
always_false_v1.patch text/x-patch 3.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2019-12-19 23:35:19 Re: Fetching timeline during recovery
Previous Message Thomas Munro 2019-12-19 23:05:34 Condition variables vs interrupts