...
Code Block | ||
---|---|---|
| ||
char *temp;
char *copy = NULL;
if ((temp = getenv("TEST_ENV")) != NULL) {
copy = (char *)malloc(strlen(temp) + 1);
if (copy != NULL) {
strcpy(copy, temp);
}
else {
/* handle error condition */
}
}
|
...
...
Code Block | ||
---|---|---|
| ||
char *temp;
char *copy = NULL;
if ((temp = getenv("TEST_ENV")) != NULL) {
copy = (char *)malloc(strlen(temp) + 1);
if (copy != NULL) {
strcpy(copy, temp);
}
else {
/* handle error condition */
}
}
|
...