pgpool2.git / summary / log / commit / refs
commit f15c8a3025b525e870281420d52bfb32ca73e97c
Author: Bo Peng <pengbo@sraoss.co.jp>
Date: Mon Sep 01 02:28:47 2025 +0000
Fix compile warning on Fedora 42.
src/watchdog/wd_heartbeat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/watchdog/wd_heartbeat.c b/src/watchdog/wd_heartbeat.c
index acececc1a..5d08abec0 100644
--- a/src/watchdog/wd_heartbeat.c
+++ b/src/watchdog/wd_heartbeat.c
@@ -270,7 +270,7 @@ wd_create_hb_recv_socket(WdHbIf *hb_if)
hints.ai_protocol = 0;
hints.ai_flags = AI_NUMERICSERV | AI_PASSIVE;
- if ((gai_ret = getaddrinfo(!hb_if->addr ? NULL : hb_if->addr, portstr, &hints, &res)) != 0)
+ if ((gai_ret = getaddrinfo(hb_if->addr[0] == '\0' ? NULL : hb_if->addr, portstr, &hints, &res)) != 0)
{
ereport(WARNING,
(errmsg("getaddrinfo() failed with error \"%s\"", gai_strerror(gai_ret))));
[parent: 905518d9d523]