Preparing for upcoming POSIXed putenv() rewrite:
don't allow const as putenv() arg, dup it
This commit is contained in:
parent
c7368c3569
commit
903fd42535
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user