pgsql: Remove a couple of strerror() calls

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove a couple of strerror() calls
Date: 2024-09-04 12:52:58
Message-ID: E1slpVJ-0006p9-Tu@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove a couple of strerror() calls

Change to using %m in the error message string. We need to be a bit
careful here to preserve errno until we need to print it.

This change avoids the use of not-thread-safe strerror() and unifies
some error message strings, and maybe makes the code appear more
consistent.

Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://www.postgresql.org/message-id/flat/daa87d79-c044-46c4-8458-8d77241ed7b0%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/82b07eba9e8b863cc05adb7e53a86ff02b51d888

Modified Files
--------------
src/backend/libpq/hba.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2024-09-04 18:39:05 pgsql: Revert "Optimize pg_visibility with read streams."
Previous Message Michael Paquier 2024-09-04 05:53:58 pgsql: Unify some error messages to ease work of translators