attempting to bind() an already bound UNIX domain socket returns EINVAL (kre)
[unix-history] / usr / src / sys / kern / subr_rmap.c.sav
index 03f322c..7daeec8 100644 (file)
@@ -1,13 +1,19 @@
-/*     subr_rmap.c.sav 6.1     83/07/29        */
+/*
+ * Copyright (c) 1982 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)subr_rmap.c.sav     6.4 (Berkeley) %G%
+ */
 
 
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/map.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/proc.h"
-#include "../h/text.h"
-#include "../h/kernel.h"
+#include "param.h"
+#include "systm.h"
+#include "map.h"
+#include "dir.h"
+#include "user.h"
+#include "proc.h"
+#include "text.h"
+#include "kernel.h"
 
 /*
  * Resource map handling routines.
 
 /*
  * Resource map handling routines.
@@ -320,7 +326,7 @@ rmget(mp, size, addr)
                         */
                        for (bp2=bp; bp2->m_size; bp2++)
                                ;
                         */
                        for (bp2=bp; bp2->m_size; bp2++)
                                ;
-                       if (bp2 == mp->m_limit)
+                       if (bp2 + 1 >= mp->m_limit)
                                return (0);
                        while (bp2 > bp) {
                                (bp2+1)->m_addr = bp2->m_addr;
                                return (0);
                        while (bp2 > bp) {
                                (bp2+1)->m_addr = bp2->m_addr;