Commit f4482a54 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 784e762e
...@@ -117,7 +117,7 @@ GetConnection(void) ...@@ -117,7 +117,7 @@ GetConnection(void)
/* If -W was given, force prompt for password, but only the first time */ /* If -W was given, force prompt for password, but only the first time */
need_password = (dbgetpassword == 1 && dbpassword == NULL); need_password = (dbgetpassword == 1 && dbpassword == NULL);
while (true) do
{ {
/* Get a new password if appropriate */ /* Get a new password if appropriate */
if (need_password) if (need_password)
...@@ -161,9 +161,8 @@ GetConnection(void) ...@@ -161,9 +161,8 @@ GetConnection(void)
PQfinish(tmpconn); PQfinish(tmpconn);
need_password = true; need_password = true;
} }
else
break;
} }
while (need_password);
if (PQstatus(tmpconn) != CONNECTION_OK) if (PQstatus(tmpconn) != CONNECTION_OK)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment