pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Cosmetic improvements in new config_info code.
Date: Sun, 21 Feb 2016 16:38:29 +0000
Message-ID: <E1aXX1h-0004Yg-CB@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


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


view thread (4+ messages)  latest in thread

Message-ID: <E1aXX1h-0004Yg-CB@gemulon.postgresql.org>
Permalink:  ../E1aXX1h-0004Yg-CB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1aXX1h-0004Yg-CB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Cosmetic improvements in new config_info code.
  In-Reply-To: <E1aXX1h-0004Yg-CB@gemulon.postgresql.org>
  References: <E1aXX1h-0004Yg-CB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox