From: Remi Gacogne Date: Sat, 21 Oct 2017 11:09:06 +0000 (+0200) Subject: Fix a shadowed variable wrt EINTR handling in isTCPSocketUsable() X-Git-Tag: rec-4.1.0-rc2~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5799%2Fhead;p=thirdparty%2Fpdns.git 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. --- diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 6549431d12..d6facc0295 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 */