...
Code Block | ||
---|---|---|
| ||
char *temp; char *tmpvar; if ((temp = getenv("TEMP")) != NULL) { tmpvar= malloc(strlen(temp) + 1); if (tmpvar != NULL) strcpy(tmpvar, temp); else /* handle error condition */ tmpvar[0] = 'a'; setenv("TEMP", tmpvar, 1); } else { return -1; } |
...