summaryrefslogtreecommitdiffstats
path: root/bin/df
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-04-30 04:29:17 +0000
committerache <ache@FreeBSD.org>2007-04-30 04:29:17 +0000
commit2e498f754e694bb67cf2fb2a2037dc2997e33ea7 (patch)
treecbcc988ca9692e5351d21a9fafd311d3d1a74ee9 /bin/df
parentc323ce85c0eaf14d111cdf5ef23b15e276294ea1 (diff)
downloadFreeBSD-src-2e498f754e694bb67cf2fb2a2037dc2997e33ea7.zip
FreeBSD-src-2e498f754e694bb67cf2fb2a2037dc2997e33ea7.tar.gz
Eliminate error with -W* strict flags and make putenv() calls conforming to
standard in the same way as f.e. gcc internal portable code does.
Diffstat (limited to 'bin/df')
-rw-r--r--bin/df/df.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/df/df.c b/bin/df/df.c
index 5420da9..0350d98 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -131,14 +131,14 @@ main(int argc, char *argv[])
*/
if (kflag)
break;
- putenv("BLOCKSIZE=512");
+ putenv(strdup("BLOCKSIZE=512"));
hflag = 0;
break;
case 'c':
cflag = 1;
break;
case 'g':
- putenv("BLOCKSIZE=1g");
+ putenv(strdup("BLOCKSIZE=1g"));
hflag = 0;
break;
case 'H':
@@ -152,7 +152,7 @@ main(int argc, char *argv[])
break;
case 'k':
kflag++;
- putenv("BLOCKSIZE=1024");
+ putenv(strdup("BLOCKSIZE=1024"));
hflag = 0;
break;
case 'l':
@@ -162,7 +162,7 @@ main(int argc, char *argv[])
lflag = 1;
break;
case 'm':
- putenv("BLOCKSIZE=1m");
+ putenv(strdup("BLOCKSIZE=1m"));
hflag = 0;
break;
case 'n':
OpenPOWER on IntegriCloud