diff options
| author | Daniel Gustafsson | 2025-11-13 15:35:07 +0000 |
|---|---|---|
| committer | Daniel Gustafsson | 2025-11-13 15:35:07 +0000 |
| commit | d22cc7326ce0fe5033f2c6e3f711047d263c1c86 (patch) | |
| tree | 8532c5609aa4f5290bebfb357b6d482ed131dded | |
| parent | 7dc4fa91413d62c47f41043c0fce0be536f51e13 (diff) | |
While the underlying getaddrinfo call accepts a null pointer for
the hintp parameter, pg_getaddrinfo_all does not. Document this
difference with a comment to make it clear.
Author: Daniel Gustafsson <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Reported-by: Sergey Tatarintsev <[email protected]>
Discussion: https://postgr.es/m/[email protected]
| -rw-r--r-- | src/common/ip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/ip.c b/src/common/ip.c index 0e7897a5c8f..71e5934557e 100644 --- a/src/common/ip.c +++ b/src/common/ip.c @@ -48,6 +48,9 @@ static int getnameinfo_unix(const struct sockaddr_un *sa, int salen, /* * pg_getaddrinfo_all - get address info for Unix, IPv4 and IPv6 sockets + * + * The API of this routine differs from the standard getaddrinfo() definition + * in that it requires a valid hintp, a null pointer is not allowed. */ int pg_getaddrinfo_all(const char *hostname, const char *servname, |
