commit e593d5fa38fad9ac15a641866e473926e95076c0
parent db5ceade9fa1cfb602fab3748814f7d11c4dea3b
Author: Roberto E. Vargas Caballero <roberto.vargas@midokura.com>
Date: Thu, 17 Nov 2022 10:20:28 +0100
os9: Restore the name newmap() from dupmap()
To be consistent with the other functions.
Diffstat:
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/os9/proc.c b/src/os9/proc.c
@@ -290,25 +290,14 @@ newfds(Fdset *from)
}
static Map *
-newmap(void)
+newmap(Map *from)
{
Map *mp;
if ((mp = alloc(sizeof(*mp))) == NULL)
return NULL;
- return mp;
-}
-
-static Map *
-dupmap(Map *from)
-{
- Map *mp;
-
- mp = newmap();
- if (!mp)
- return NULL;
- *mp = *from;
+ *mp = (from) ? *from : (Map) {0};
initref(&mp->ref);
mapseg(mp); /* FIXME: we have to duplicate the pages */
@@ -448,7 +437,7 @@ rfork(int flags)
goto err;
}
if ((flags & RFMEM) == 0) {
- if ((data = dupmap(proc->data)) == NULL)
+ if ((data = newmap(proc->data)) == NULL)
goto err;
}