mirror of
https://github.com/postgres/postgres.git
synced 2025-06-06 00:02:36 -04:00
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
This commit is contained in:
parent
1add0b15f1
commit
4d06f1f858
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user