about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-11 16:43:48 +0000
committerRoland McGrath <roland@gnu.org>1999-06-11 16:43:48 +0000
commit13f03ba4a44ec760bbba7ec3e6b893aca3f3ef34 (patch)
tree997e4cb7107a3f5c9eaf617250376fd07c08830b
parent17763865348777221912fb8527f9d327bd9ff37a (diff)
downloadglibc-13f03ba4a44ec760bbba7ec3e6b893aca3f3ef34.tar.gz
glibc-13f03ba4a44ec760bbba7ec3e6b893aca3f3ef34.tar.xz
glibc-13f03ba4a44ec760bbba7ec3e6b893aca3f3ef34.zip
1999-06-11 Mark Kettenis <kettenis@gnu.org>
* hurd/hurdsock.c (max_domain): Initialize to `-1'. 
(_hurd_socket_server): Fix off-by-one error in setting `max_domain'.
-rw-r--r--hurd/hurdsock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hurd/hurdsock.c b/hurd/hurdsock.c
index f5263b2cb9..082cbaf6d6 100644
--- a/hurd/hurdsock.c
+++ b/hurd/hurdsock.c
@@ -1,5 +1,5 @@
 /* _hurd_socket_server - Find the server for a socket domain.
-   Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+   Copyright (C) 1991,92,93,94,95,97,99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
 static struct mutex lock;
 
 static file_t *servers;
-static int max_domain;
+static int max_domain = -1;
 
 /* Return a port to the socket server for DOMAIN.
    Socket servers translate nodes in the directory _SERVERS_SOCKET
@@ -57,7 +57,7 @@ _hurd_socket_server (int domain, int dead)
       if (new != NULL)
 	{
 	  while (max_domain <= domain)
-	    new[max_domain++] = MACH_PORT_NULL;
+	    new[++max_domain] = MACH_PORT_NULL;
 	  servers = new;
 	}
       else