BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c
Date
Msg-id 18230-c68eb05e05cb9177@postgresql.org
Whole thread Raw
Responses Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18230
Logged by:          RekGRpth
Email address:      rekgrpth@gmail.com
PostgreSQL version: 16.1
Operating system:   all
Description:

All versions of PostgreSQL has redundant comparison of a local variable
'tzp' address with a NULL value at dt_common.c in DecodeDateTime function.

```c
...
    int            t = 0;
    int           *tzp = &t;
...
    if (tzp != NULL)
...

                    if (tzp == NULL)
...
```


pgsql-bugs by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: BUG #16925: ERROR: invalid DSA memory alloc request size 1073741824 CONTEXT: parallel worker
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #18230: Redundant comparison of a local variable 'tzp' address with a NULL value at dt_common.c