summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkswapconf.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-12-14 19:53:49 +0000
committerjoerg <joerg@FreeBSD.org>1996-12-14 19:53:49 +0000
commit5476bdc6871cd231f6041ffed18201a40fd63370 (patch)
tree5f4ce179ffc745f34801c743beca866f4dff0bf6 /usr.sbin/config/mkswapconf.c
parent000a733206a490453542c9e437941673ec57912a (diff)
downloadFreeBSD-src-5476bdc6871cd231f6041ffed18201a40fd63370.zip
FreeBSD-src-5476bdc6871cd231f6041ffed18201a40fd63370.tar.gz
Part #2 of the config cleanup. More aggressive, replaced an NIH
version of strdup() by a macro, killed many calls to strdup(), thus potentially wasting less malloc'ed space (their args were never be free()ed desptie despite of being malloc'ed). Probably still a huge memory leak at all... Also killed two totally useless variables. I've tested it as i could, but wouldn't be surprised if unexpected problems showed up. So watch out this space!
Diffstat (limited to 'usr.sbin/config/mkswapconf.c')
-rw-r--r--usr.sbin/config/mkswapconf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/config/mkswapconf.c b/usr.sbin/config/mkswapconf.c
index 1d5756f..18a8084 100644
--- a/usr.sbin/config/mkswapconf.c
+++ b/usr.sbin/config/mkswapconf.c
@@ -45,6 +45,9 @@ static char sccsid[] = "@(#)mkswapconf.c 8.1 (Berkeley) 6/6/93";
#include <ctype.h>
#include <stdio.h>
+#include <string.h>
+
+#define ns(s) strdup(s)
swapconf()
{
OpenPOWER on IntegriCloud