summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-04-30 15:16:19 +0000
committerache <ache@FreeBSD.org>2007-04-30 15:16:19 +0000
commitebe0ac8fd2e783327c76fe23b0dbe715c2987ed1 (patch)
tree2cbffdde642e13a49b570bc57e1bf516436f79e3 /usr.sbin
parent4d05f6527a4147faafcf78f1155960ea78989153 (diff)
downloadFreeBSD-src-ebe0ac8fd2e783327c76fe23b0dbe715c2987ed1.zip
FreeBSD-src-ebe0ac8fd2e783327c76fe23b0dbe715c2987ed1.tar.gz
Preparing for upcoming POSIXed putenv() rewrite:
don't allow const as putenv() arg, dup it
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pstat/pstat.c6
-rw-r--r--usr.sbin/sade/main.c2
-rw-r--r--usr.sbin/sysinstall/main.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 95f782c..8fdd83d 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -135,16 +135,16 @@ main(int argc, char *argv[])
fileflag = 1;
break;
case 'g':
- putenv("BLOCKSIZE=1G");
+ putenv(strdup("BLOCKSIZE=1G"));
break;
case 'h':
humanflag = 1;
break;
case 'k':
- putenv("BLOCKSIZE=1K");
+ putenv(strdup("BLOCKSIZE=1K"));
break;
case 'm':
- putenv("BLOCKSIZE=1M");
+ putenv(strdup("BLOCKSIZE=1M"));
break;
case 'M':
memf = optarg;
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index 45ed1bb..65e14a9 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -56,7 +56,7 @@ main(int argc, char **argv)
/* XXX */
char *p = getenv("TERM");
if (p && strcmp(p, "cons25") == 0)
- putenv("TERM=cons25w");
+ (void)putenv(strdup("TERM=cons25w"));
}
#endif
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index 7af8d44..c1b4e34 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -74,7 +74,7 @@ main(int argc, char **argv)
/* XXX */
char *p = getenv("TERM");
if (p && strcmp(p, "cons25") == 0)
- putenv("TERM=cons25w");
+ (void)putenv(strdup("TERM=cons25w"));
}
#endif
OpenPOWER on IntegriCloud