summaryrefslogtreecommitdiff
path: root/src/include/common
diff options
context:
space:
mode:
authorTom Lane2016-02-21 16:38:24 +0000
committerTom Lane2016-02-21 16:38:24 +0000
commitc7a1c5a6b6aa4bbc2c9619edc94368fccc1c8c8e (patch)
treefbaa863661024d34344facaa0c6b38194df40f54 /src/include/common
parent94c745eb189e2122a3ff86c24443b11408ea2376 (diff)
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.
Diffstat (limited to 'src/include/common')
-rw-r--r--src/include/common/config_info.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/common/config_info.h b/src/include/common/config_info.h
index 649ef5cf4be..c9e6e1cc8f8 100644
--- a/src/include/common/config_info.h
+++ b/src/include/common/config_info.h
@@ -15,7 +15,7 @@ typedef struct ConfigData
char *setting;
} ConfigData;
-extern ConfigData *get_configdata(char *my_exec_path,
+extern ConfigData *get_configdata(const char *my_exec_path,
size_t *configdata_len);
#endif /* COMMON_CONFIG_INFO_H */