>> Is there any reason for the function returns int as it always returns
>> 0 or 1. Maybe returns bool is better?
> 
> No, return type should be bool, I have changed the same in attached patch.

Confirmed.

>> 2) initdb.c
>>
>> +       strcpy(tempautobuf, "# Do not edit this file manually! \n");
>> +       autoconflines[0] = pg_strdup(tempautobuf);
>> +       strcpy(tempautobuf, "# It will be overwritten by the ALTER SYSTEM 
>> command. \n");
>> +       autoconflines[1] = pg_strdup(tempautobuf);
>>
>> Is there any reason to use "tempautobuf" here? I think we can simply change 
>> to this:
>>
>> +       autoconflines[0] = pg_strdup("# Do not edit this file manually! \n");
>> +       autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER 
>> SYSTEM command. \n");
> 
> You are right, I have changed code as per your suggestion.

Confirmed.

>> 3) initdb.c
>>
>> It seems the memory allocated for autoconflines[0] and
>> autoconflines[1] by pg_strdup is never freed.
> 
> I think, it gets freed in writefile() in below code.

Oh, I see. Sorry for noise.

I have committed your patches. Thanks.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


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

Reply via email to