[vlc-commits] network: fix potentially redundant test

Rémi Denis-Courmont git at videolan.org
Tue Apr 26 22:14:21 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 26 23:06:58 2016 +0300| [5ee961ef7b0dc9d46a5756278d53c8e40ba88caf] | committer: Rémi Denis-Courmont

network: fix potentially redundant test

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ee961ef7b0dc9d46a5756278d53c8e40ba88caf
---

 src/network/tcp.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/network/tcp.c b/src/network/tcp.c
index 442edaf..6b592e9 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -237,7 +237,10 @@ int net_AcceptSingle (vlc_object_t *obj, int lfd)
     int fd = vlc_accept (lfd, NULL, NULL, true);
     if (fd == -1)
     {
-        if (net_errno != EAGAIN && net_errno != EWOULDBLOCK)
+        if (net_errno != EAGAIN)
+#if (EAGAIN != EWOULDBLOCK)
+          if (net_errno != EWOULDBLOCK)
+#endif
             msg_Err (obj, "accept failed (from socket %d): %s", lfd,
                      vlc_strerror_c(net_errno));
         return -1;



More information about the vlc-commits mailing list