Skip to content

Commit f4482a5

Browse files
committed
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.
1 parent 784e762 commit f4482a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bin/pg_basebackup/streamutil.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ GetConnection(void)
117117
/* If -W was given, force prompt for password, but only the first time */
118118
need_password = (dbgetpassword == 1 && dbpassword == NULL);
119119

120-
while (true)
120+
do
121121
{
122122
/* Get a new password if appropriate */
123123
if (need_password)
@@ -161,9 +161,8 @@ GetConnection(void)
161161
PQfinish(tmpconn);
162162
need_password = true;
163163
}
164-
else
165-
break;
166164
}
165+
while (need_password);
167166

168167
if (PQstatus(tmpconn) != CONNECTION_OK)
169168
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy