Fix formatting

This commit is contained in:
Ian Barwick
2017-04-21 13:28:29 +09:00
parent 073afbce54
commit 11b7dda778

View File

@@ -200,10 +200,6 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
char name[MAXLEN];
char value[MAXLEN];
/* For sanity-checking provided conninfo string */
PQconninfoOption *conninfo_options;
char *conninfo_errmsg = NULL;
bool node_id_found = false;
/* Initialize configuration options with sensible defaults */
@@ -519,14 +515,19 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
* NOTE: PQconninfoParse() verifies the string format and checks for valid options
* but does not sanity check values
*/
PQconninfoOption *conninfo_options;
char *conninfo_errmsg = NULL;
conninfo_options = PQconninfoParse(options->conninfo, &conninfo_errmsg);
if (conninfo_options == NULL)
{
char error_message_buf[MAXLEN] = "";
snprintf(error_message_buf,
MAXLEN,
_("\"conninfo\": %s"),
conninfo_errmsg);
_("\"conninfo\": %s (provided: \"%s\")"),
conninfo_errmsg,
options->conninfo);
item_list_append(error_list, error_message_buf);
}
@@ -643,6 +644,7 @@ exit_with_errors(ItemList *config_errors, ItemList *config_warnings)
if (config_warnings->head != NULL)
{
puts("");
log_warning(_("the following problems were also found in the configuration file:"));
for (cell = config_warnings->head; cell; cell = cell->next)
{