pgsql: Cosmetic improvements in new config_info code. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Cosmetic improvements in new config_info code.
Date
Msg-id E1aXX1h-0004Yg-CB@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Cosmetic improvements in new config_info code.  (Joe Conway <mail@joeconway.com>)
List pgsql-committers
Cosmetic improvements in new config_info code.

Coverity griped about use of unchecked strcpy() into a local variable.
There's unlikely to be any actual bug there, since no caller would be
passing a path longer than MAXPGPATH, but nonetheless use of strlcpy()
seems preferable.

While at it, get rid of unmaintainable separation between list of
field names and list of field values in favor of initializing them
in parallel.  And we might as well declare get_configdata()'s path
argument as const char *, even though no current caller needs that.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c7a1c5a6b6aa4bbc2c9619edc94368fccc1c8c8e

Modified Files
--------------
src/common/config_info.c         | 176 +++++++++++++++++++--------------------
src/include/common/config_info.h |   2 +-
2 files changed, 89 insertions(+), 89 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Fix two-argument jsonb_object when called with empty arrays
Next
From: Joe Conway
Date:
Subject: Re: pgsql: Cosmetic improvements in new config_info code.