The C Standard, 7.22.4.6, paragraph 4 [ISO/IEC 9899:2011], states:
The
getenv
function returns a pointer to a string associated with the matched list member. The string pointed to shall not be modified by the program but may be overwritten by a subsequent call to thegetenv
function.
...
This noncompliant code example attempts to compare the value of the TMP
and TEMP
environment variables to determine if they are the same:
...