From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | code cleanup empty string initializations |
Date: | 2017-08-31 03:02:33 |
Message-ID: | 2b950187-2b9e-37f4-dda8-3806df9dbe58@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In initdb, many global string variables are initialized as empty strings
("") and then checked later with strcmp(), instead of just using NULL.
I think this is probably left over from the shell script conversion.
The style has also spread to pg_basebackup. So here is a patch to clean
that up, and a second patch to clean up some other a bit confusing
business in initdb that seems like old shell script code.
While looking around, I found some useless empty string initializations
in the ecpg test suite as well, and here is another patch for that.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Remove-useless-dead-code.patch | text/plain | 6.0 KB |
0002-Remove-useless-empty-string-initializations.patch | text/plain | 6.4 KB |
0003-Clean-up-excessive-code.patch | text/plain | 3.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2017-08-31 03:04:25 | Re: Revisiting NAMEDATALEN |
Previous Message | Noah Misch | 2017-08-31 02:53:45 | Re: Back-branch release notes up for review |