]> granicus.if.org Git - postgresql/commit
Cosmetic improvements in new config_info code.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 21 Feb 2016 16:38:24 +0000 (11:38 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 21 Feb 2016 16:38:24 +0000 (11:38 -0500)
commitc7a1c5a6b6aa4bbc2c9619edc94368fccc1c8c8e
treefbaa863661024d34344facaa0c6b38194df40f54
parent94c745eb189e2122a3ff86c24443b11408ea2376
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.
src/common/config_info.c
src/include/common/config_info.h