Commit 4d06f1f8 authored by Heikki Linnakangas's avatar Heikki Linnakangas

Fix check for empty hostname.

As reported by Arthur Zakirov, Gcc 7.1 complained about this with
-Wpointer-compare.

Discussion: https://www.postgresql.org/message-id/CAKNkYnybV_NFVacGbW=VspzAo3TwRJFNi+9iBob66YqQMZopwg@mail.gmail.com
parent 1add0b15
......@@ -1097,7 +1097,7 @@ connectOptions2(PGconn *conn)
char *pwhost = conn->connhost[i].host;
if (conn->connhost[i].type == CHT_HOST_ADDRESS &&
conn->connhost[i].host != NULL && conn->connhost[i].host != '\0')
conn->connhost[i].host != NULL && conn->connhost[i].host[0] != '\0')
pwhost = conn->connhost[i].hostaddr;
conn->connhost[i].password =
......
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