Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The use of type-generic function-like macros is an allowed exception (PRE00-EX4) to PRE00-AC. Prefer inline or static functions to function-like macros - CERT Secure Coding Standards.

Risk Assessment

Failing to cast the result of a memory allocation function call into a pointer to the allocated type can result in inadvertent pointer conversions. Code that follows this recommendation will compile and execute equally well in C++.

...