mirror of
https://github.com/postgres/postgres.git
synced 2025-08-17 01:02:17 +03:00
Use clearer notation for getnameinfo() return handling
Writing if (getnameinfo(...)) handle_error(); reads quite strangely, so use something like if (getnameinfo(...) != 0) handle_error(); instead.
This commit is contained in:
@@ -569,7 +569,7 @@ check_hostname(hbaPort *port, const char *hostname)
|
||||
if (pg_getnameinfo_all(&port->raddr.addr, port->raddr.salen,
|
||||
remote_hostname, sizeof(remote_hostname),
|
||||
NULL, 0,
|
||||
0))
|
||||
0) != 0)
|
||||
return false;
|
||||
|
||||
port->remote_hostname = pstrdup(remote_hostname);
|
||||
|
Reference in New Issue
Block a user