Chapter 10. Environment (ENV)
ENV30-C. Do not modify the object referenced by the return value of certain functions
Some functions return a pointer to an object that cannot be modified without causing undefined behavior. These functions include getenv()
, setlocale()
, localeconv()
, asctime()
, and strerror()
. In such cases, the function call results must be treated as being const
-qualified.
The C Standard, ...
Get The CERT ® C Coding Standard: 98 Rules for Developing Safe, Reliable, and Secure Systems, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.