From 88479ac51859b7b7cfeddccfed11e683991862cb Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Sat, 21 Oct 2017 13:09:06 +0200 Subject: [PATCH] Fix a shadowed variable wrt EINTR handling in isTCPSocketUsable() This would have prevented us from looping as long as we keep getting interrupted. Reported by GCC with -Wshadow enabled. --- pdns/iputils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 6549431d1..d6facc029 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -425,7 +425,7 @@ bool isTCPSocketUsable(int sock) return false; } else { - int err = errno; + err = errno; if (err == EAGAIN || err == EWOULDBLOCK) { /* socket is usable, no data waiting */ -- 2.40.0