Skip to content

Commit

Permalink
Delete unnecessary StringInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur committed Apr 11, 2024
1 parent 135df8b commit 733adbc
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions bin/pgut/pgut-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,9 @@ void disconnect_workers(void)
void
reconnect(int elevel)
{
StringInfoData buf;
char *new_password;

disconnect();
initStringInfo(&buf);
if (dbname && dbname[0])
appendStringInfo(&buf, "dbname=%s ", dbname);
if (host && host[0])
appendStringInfo(&buf, "host=%s ", host);
if (port && port[0])
appendStringInfo(&buf, "port=%s ", port);
if (username && username[0])
appendStringInfo(&buf, "user=%s ", username);
if (password && password[0])
appendStringInfo(&buf, "password='%s' ", password);

connection = pgut_connect(dbname, host, port, username, password, prompt_password, elevel);
conn2 = pgut_connect(dbname, host, port, username, password, prompt_password, elevel);
Expand All @@ -187,8 +175,6 @@ reconnect(int elevel)
password = pgut_strdup(new_password);
}
}

termStringInfo(&buf);
}

void
Expand Down

0 comments on commit 733adbc

Please sign in to comment.