about summary refs log tree commit diff
path: root/hurd/getdport.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /hurd/getdport.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'hurd/getdport.c')
-rw-r--r--hurd/getdport.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hurd/getdport.c b/hurd/getdport.c
index eeb5a8689e..41567d5fe1 100644
--- a/hurd/getdport.c
+++ b/hurd/getdport.c
@@ -35,8 +35,11 @@ __getdport (int fd)
      so we don't bother allocating a real table.  */
 
   if (_hurd_init_dtable == NULL)
-    /* Never had a descriptor table.  */
-    return EBADF;
+    {
+      /* Never had a descriptor table.  */
+      errno = EBADF;
+      return MACH_PORT_NULL;
+    }
 
   if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize ||
       _hurd_init_dtable[fd] == MACH_PORT_NULL)