mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 15:46:29 +00:00
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.
This commit is contained in:
@@ -634,7 +634,7 @@ main(int argc, char **argv)
|
|||||||
* If -d/--dbname appears to be a conninfo string, validate by attempting
|
* If -d/--dbname appears to be a conninfo string, validate by attempting
|
||||||
* to parse it (and if successful, store the parsed parameters)
|
* 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 ||
|
if (strncmp(runtime_options.dbname, "postgresql://", 13) == 0 ||
|
||||||
strncmp(runtime_options.dbname, "postgres://", 11) == 0 ||
|
strncmp(runtime_options.dbname, "postgres://", 11) == 0 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user