From f15c8a3025b525e870281420d52bfb32ca73e97c Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 1 Sep 2025 11:28:47 +0900 Subject: [PATCH] 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)))); -- 2.39.5