diff options
| author | Peter Eisentraut | 2022-02-15 09:03:52 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2022-02-15 09:16:34 +0000 |
| commit | 797129e5910144a2a937b88e145874a15b83578a (patch) | |
| tree | 7d19263d97ad759f3109ec427afff93cc763b03a /src/backend/libpq/hba.c | |
| parent | a59135a81aa781d126c48a516179e43dbb0d428a (diff) | |
Remove IS_AF_UNIX macro
The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS,
apparently since 2008. So the redirection through IS_AF_UNIX() is
apparently no longer necessary. (More generally, all supported
platforms are now HAVE_UNIX_SOCKETS, but even if there were a new
platform in the future, it seems plausible that it would define the
AF_UNIX symbol even without kernel support.) So remove the
IS_AF_UNIX() macro and make the code a bit more consistent.
Discussion: https://www.postgresql.org/message-id/flat/f2d26815-9832-e333-d52d-72fbc0ade896%40enterprisedb.com
Diffstat (limited to 'src/backend/libpq/hba.c')
| -rw-r--r-- | src/backend/libpq/hba.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index a7f3def184e..d84a40b7265 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -2138,12 +2138,12 @@ check_hba(hbaPort *port) /* Check connection type */ if (hba->conntype == ctLocal) { - if (!IS_AF_UNIX(port->raddr.addr.ss_family)) + if (port->raddr.addr.ss_family != AF_UNIX) continue; } else { - if (IS_AF_UNIX(port->raddr.addr.ss_family)) + if (port->raddr.addr.ss_family == AF_UNIX) continue; /* Check SSL state */ |
