about summary refs log tree commit diff
path: root/hurd/hurdsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurdsock.c')
-rw-r--r--hurd/hurdsock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
index 58c27feb2b..1d04047a02 100644
--- a/hurd/hurdsock.c
+++ b/hurd/hurdsock.c
@@ -48,10 +48,7 @@ _hurd_socket_server (int domain, int dead)
   socket_t server;
 
   if (domain < 0)
-    {
-      errno = EAFNOSUPPORT;
-      return MACH_PORT_NULL;
-    }
+    return __hurd_fail (EAFNOSUPPORT), MACH_PORT_NULL;
 
 retry:
   HURD_CRITICAL_BEGIN;
@@ -99,7 +96,7 @@ retry:
 
   if (server == MACH_PORT_NULL && errno == ENOENT)
     /* If the server node is absent, we don't support that protocol.  */
-    errno = EAFNOSUPPORT;
+    __hurd_fail (EAFNOSUPPORT);
 
   __mutex_unlock (&lock);
   HURD_CRITICAL_END;