Preparing for upcoming POSIXed putenv() rewrite:

don't allow const as putenv() arg, dup it
This commit is contained in:
Andrey A. Chernov 2007-04-30 15:16:19 +00:00
parent c7368c3569
commit 903fd42535
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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

View File

@ -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