Re: pgsql: Cosmetic improvements in new config_info code.

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Cosmetic improvements in new config_info code.
Date: 2016-02-21 18:17:51
Message-ID: 56C9FF4F.7010603@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 02/21/2016 08:38 AM, Tom Lane wrote:
> 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.

FWIW, strcpy() was being used in src/bin/pg_config/pg_config.c that I
started with -- does that mean we are not getting Coverity coverage of
src/bin?

> 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.

I waffled back and forth about doing something similar and apparently
landed on the wrong side of it :-). I'll take a similar tack with the
controldata patch that I'm trying to get over the finish line.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2016-02-21 18:37:18 Re: [COMMITTERS] pgsql: Cosmetic improvements in new config_info code.
Previous Message Tom Lane 2016-02-21 17:45:36 Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-02-21 18:37:18 Re: [COMMITTERS] pgsql: Cosmetic improvements in new config_info code.
Previous Message Tom Lane 2016-02-21 18:05:23 Re: a raft of parallelism-related bug fixes