Factor mailbox_create() out of nat_reset() and files.c

This commit is contained in:
Markus Armbruster 2011-11-26 16:01:51 +01:00
parent 8b7591f5d7
commit c4337f7aec
4 changed files with 17 additions and 10 deletions

View file

@ -34,10 +34,7 @@
#include <config.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "file.h"
#include "misc.h"
#include "nat.h"
@ -208,8 +205,7 @@ nat_reset(struct natstr *natp, natid cnum, char *name, char *rep,
ef_blank(EF_REALM, i + cnum * MAXNOR, &newrealm);
putrealm(&newrealm);
}
close(creat(mailbox(buf, cnum),
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
mailbox_create(mailbox(buf, cnum));
/* FIXME natp->nat_ann = #annos */
natp->nat_level[NAT_HLEV] = start_happiness;
natp->nat_level[NAT_RLEV] = start_research;