From b365765bc8df36f6601f04376b5c064b7a8a3746 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 10 May 2018 11:57:02 +0900 Subject: [PATCH] Fix check for -d/--dbname parameter Not a bug per-se, just meant some unnecessary processing was done on an empty string. Per note from petere. --- repmgr-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr-client.c b/repmgr-client.c index a3c56322..fef8acbe 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -634,7 +634,7 @@ main(int argc, char **argv) * If -d/--dbname appears to be a conninfo string, validate by attempting * to parse it (and if successful, store the parsed parameters) */ - if (runtime_options.dbname) + if (runtime_options.dbname[0]) { if (strncmp(runtime_options.dbname, "postgresql://", 13) == 0 || strncmp(runtime_options.dbname, "postgres://", 11) == 0 ||