diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2013-11-21 21:46:43 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2013-11-21 21:46:43 -0500 |
commit | f4482a542c30034c7871fd35050128823ef5c6d5 (patch) | |
tree | 8c5c66f10fcc55c959b0319acf9d362d4bebf031 /src | |
parent | 784e762e886e6f72f548da86a27cd2ead87dbd1c (diff) | |
download | postgresql-f4482a542c30034c7871fd35050128823ef5c6d5.tar.gz postgresql-f4482a542c30034c7871fd35050128823ef5c6d5.zip |
Tweak streamutil.c further to avoid scan-build warning
The previous change added a new scan-build warning about need_password
assigned but not read.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/streamutil.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 67917512e25..6cc6cd200e6 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -117,7 +117,7 @@ GetConnection(void) /* If -W was given, force prompt for password, but only the first time */ need_password = (dbgetpassword == 1 && dbpassword == NULL); - while (true) + do { /* Get a new password if appropriate */ if (need_password) @@ -161,9 +161,8 @@ GetConnection(void) PQfinish(tmpconn); need_password = true; } - else - break; } + while (need_password); if (PQstatus(tmpconn) != CONNECTION_OK) { |