summaryrefslogtreecommitdiffstats
path: root/usr.bin/du
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-04-30 05:14:29 +0000
committerache <ache@FreeBSD.org>2007-04-30 05:14:29 +0000
commita1cdcb2c5b599264db74c66471edab1d472fe801 (patch)
tree6e71f9e5aaefa79e4bf4c7ca7eb2b35e86df58e9 /usr.bin/du
parent2e498f754e694bb67cf2fb2a2037dc2997e33ea7 (diff)
downloadFreeBSD-src-a1cdcb2c5b599264db74c66471edab1d472fe801.zip
FreeBSD-src-a1cdcb2c5b599264db74c66471edab1d472fe801.tar.gz
Eliminate error with -W* strict flags and make putenv() calls conforming to
standard and portable in the same way as f.e. gcc internal portable code does.
Diffstat (limited to 'usr.bin/du')
-rw-r--r--usr.bin/du/du.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index 00c1f5e..459a451 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -140,16 +140,16 @@ main(int argc, char *argv[])
cflag = 1;
break;
case 'h':
- putenv("BLOCKSIZE=512");
+ putenv(strdup("BLOCKSIZE=512"));
hflag = 1;
break;
case 'k':
hflag = 0;
- putenv("BLOCKSIZE=1024");
+ putenv(strdup("BLOCKSIZE=1024"));
break;
case 'm':
hflag = 0;
- putenv("BLOCKSIZE=1048576");
+ putenv(strdup("BLOCKSIZE=1048576"));
break;
case 'n':
nodumpflag = 1;
OpenPOWER on IntegriCloud