Content-Length: 275765 | pFad | http://github.com/postgrespro/postgres/commit/f4482a542c30034c7871fd35050128823ef5c6d5

44 Tweak streamutil.c further to avoid scan-build warning · postgrespro/postgres@f4482a5 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f4482a542c30034c7871fd35050128823ef5c6d5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy