[vlc-commits] gnutls: set errno on Windows too

Rémi Denis-Courmont git at videolan.org
Tue May 12 21:39:20 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May  9 19:14:06 2015 +0300| [04d62b00d2fa711af7dbbc9e70b69704e4853d55] | committer: Rémi Denis-Courmont

gnutls: set errno on Windows too

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

 modules/misc/gnutls.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index c76061e..1a80f55 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -104,17 +104,15 @@ static int gnutls_Error (vlc_object_t *obj, int val)
         case GNUTLS_E_AGAIN:
 #ifdef _WIN32
             WSASetLastError (WSAEWOULDBLOCK);
-#else
-            errno = EAGAIN;
 #endif
+            errno = EAGAIN;
             break;
 
         case GNUTLS_E_INTERRUPTED:
 #ifdef _WIN32
             WSASetLastError (WSAEINTR);
-#else
-            errno = EINTR;
 #endif
+            errno = EINTR;
             break;
 
         default:
@@ -125,9 +123,8 @@ static int gnutls_Error (vlc_object_t *obj, int val)
 #endif
 #ifdef _WIN32
             WSASetLastError (WSAECONNRESET);
-#else
-            errno = ECONNRESET;
 #endif
+            errno = ECONNRESET;
     }
     return -1;
 }



More information about the vlc-commits mailing list