Versions Compared

Key

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

...

By using the invalid() function defined above, the function is less likely to modify memory outside its bounds (see ERR06MSC11-A. Understand the termination behavior of assert() and abort()Incorporate diagnostic tests using assertions).

Code Block
bgColor#ccccff
void incr(int *intptr) {
  if (invalid( intptr)) {
    /* handle error */
  }
  *intptr++;
}

...