From: Bo Peng Date: Mon, 1 Sep 2025 02:28:47 +0000 (+0900) Subject: Fix compile warning on Fedora 42. X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=f15c8a3025b525e870281420d52bfb32ca73e97c;p=pgpool2.git Fix compile warning on Fedora 42. --- 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))));