From: David Kalnischkies Date: Mon, 25 Jan 2016 19:05:54 +0000 (+0100) Subject: drop explicit check for EWOULDBLOCK if it has the same value as EAGAIN X-Git-Tag: 1.2.2~28 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/3b0e76ec9c9386e428944f621b970d691884b84a?ds=inline;hp=--cc 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 --- 3b0e76ec9c9386e428944f621b970d691884b84a 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;