From 3b0e76ec9c9386e428944f621b970d691884b84a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 25 Jan 2016 20:05:54 +0100 Subject: drop explicit check for EWOULDBLOCK if it has the same value as EAGAIN gcc correctly reports that we check for the same value twice, expect that the manpage of read(2) tells us to do it for portability, so to make both sides happy lets add a little #if'ing here. Reported-By: gcc-6 Git-Dch: Ignore --- apt-pkg/contrib/strutl.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 856e5ee9f..5e641a02b 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -788,7 +788,11 @@ bool ReadMessages(int Fd, vector &List) return false; // No data +#if EAGAIN != EWOULDBLOCK if (Res < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) +#else + if (Res < 0 && errno == EAGAIN) +#endif return true; if (Res < 0) return false; -- cgit v1.2.3