diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-11-30 12:20:57 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-11-30 12:20:57 -0500 |
commit | c2be18c333bc09bae27d6a518677232d6dbcb45d (patch) | |
tree | 1ca41567a4330e5be7f678cbecc672d1d291c60f /src | |
parent | 168636a9914ed01abc890d9e7e416c07af415d6a (diff) | |
download | postgresql-c2be18c333bc09bae27d6a518677232d6dbcb45d.tar.gz postgresql-c2be18c333bc09bae27d6a518677232d6dbcb45d.zip |
Fix minor bugs in commit 30bf4689a96cd283af33edcdd6b7210df3f20cd8 et al.
Coverity complained that the "else" added to fillPGconn() was unreachable,
which it was. Remove the dead code. In passing, rearrange the tests so as
not to bother trying to fetch values for options that can't be assigned.
Pre-9.3 did not have that issue, but it did have a "return" that should be
"goto oom_error" to ensure that a suitable error message gets filled in.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 6ac3774d842..43911a2dea3 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -643,7 +643,7 @@ fillPGconn(PGconn *conn, PQconninfoOption *connOptions) free(conn->sslmode); conn->sslmode = strdup("require"); if (!conn->sslmode) - return false; + goto oom_error; } #endif FILL_CONN_OPTION(conn->requirepeer, "requirepeer"); @@ -746,7 +746,6 @@ connectOptions2(PGconn *conn) conn->pgpass = strdup(DefaultPassword); if (!conn->pgpass) goto oom_error; - } else conn->dot_pgpass_used = true; |