Обсуждение: [HACKERS] code cleanup empty string initializations

Поиск
Список
Период
Сортировка

[HACKERS] code cleanup empty string initializations

От
Peter Eisentraut
Дата:
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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

Re: [HACKERS] code cleanup empty string initializations

От
Aleksandr Parfenov
Дата:
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           tested, passed
Documentation:            tested, passed

Hi Peter,

I looked through your patches and its look good to me.
Patches make code more readable and clear, especially in case of encodingid.

The new status of this patch is: Ready for Committer

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] code cleanup empty string initializations

От
Peter Eisentraut
Дата:
On 9/8/17 03:45, Aleksandr Parfenov wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world:  tested, passed
> Implements feature:       tested, passed
> Spec compliant:           tested, passed
> Documentation:            tested, passed
> 
> Hi Peter,
> 
> I looked through your patches and its look good to me.
> Patches make code more readable and clear, especially in case of encodingid.
> 
> The new status of this patch is: Ready for Committer

Committed.  Thanks!

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers