diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-23 22:38:03 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-10-23 22:38:03 +0000 |
commit | bf3c020c3dffc6b56743d8a908fab5929d89c782 (patch) | |
tree | f2a1b5669121fb541ec33ff5377b9673d74ec11e /usr.sbin/config/mkswap.c | |
parent | 35f9904da1a9de4d5dc99741e0a245cf6ca6c820 (diff) |
Merge of NetBSD 961020. Includes flexible build/source dir specs
Diffstat (limited to 'usr.sbin/config/mkswap.c')
-rw-r--r-- | usr.sbin/config/mkswap.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/config/mkswap.c b/usr.sbin/config/mkswap.c index 53171687799..e04bfc40a6a 100644 --- a/usr.sbin/config/mkswap.c +++ b/usr.sbin/config/mkswap.c @@ -1,5 +1,5 @@ -/* $OpenBSD: mkswap.c,v 1.3 1996/04/21 23:40:20 deraadt Exp $ */ -/* $NetBSD: mkswap.c,v 1.4 1996/03/17 20:36:25 christos Exp $ */ +/* $OpenBSD: mkswap.c,v 1.4 1996/10/23 22:37:57 niklas Exp $ */ +/* $NetBSD: mkswap.c,v 1.5 1996/08/31 20:58:27 mycroft Exp $ */ /* * Copyright (c) 1992, 1993 @@ -88,12 +88,10 @@ mkoneswap(cf) { register struct nvlist *nv; register FILE *fp; - register char *fname; - char buf[200]; + char fname[200]; char *mountroot; - (void)sprintf(buf, "swap%s.c", cf->cf_name); - fname = path(buf); + (void)sprintf(fname, "swap%s.c", cf->cf_name); if ((fp = fopen(fname, "w")) == NULL) { (void)fprintf(stderr, "config: cannot write %s: %s\n", fname, strerror(errno)); @@ -130,7 +128,6 @@ mkoneswap(cf) fp = NULL; goto wrerror; } - free(fname); return (0); wrerror: (void)fprintf(stderr, "config: error writing %s: %s\n", @@ -138,6 +135,5 @@ wrerror: if (fp != NULL) (void)fclose(fp); /* (void)unlink(fname); */ - free(fname); return (1); } |