Re: return correct error code from pgtls_init - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: return correct error code from pgtls_init
Date
Msg-id YLbbYu9oScHNQaTI@paquier.xyz
Whole thread Raw
In response to return correct error code from pgtls_init  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: return correct error code from pgtls_init  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
On Tue, Jun 01, 2021 at 10:32:59AM -0700, Zhihong Yu wrote:
> It seems error code checking in pgtls_init() should follow the same
> convention as PG codebase adopts - i.e. the non-zero error code should be
> returned (instead of hard coded -1).
>
> Please see the attached patch.

I don't see the point of changing this.  First, other areas of
fe-secure-openssl.c use a harcoded value of -1 as error codes, so the
current style is more consistent.  Second, if we were to change that,
why are you not changing one call of pthread_mutex_lock()?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: ALTER SUBSCRIPTION REFRESH PUBLICATION has default copy_data = true?
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: Fixup some appendStringInfo and appendPQExpBuffer calls