Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
...
list = malloc(sizeof(int) * s);
if (list == NULL) {
  /* Handle Allocation Error */
}
/* Continue Processing list */
...

Compliant Code Example 1

To ensure that zero is never passed as a size argument to malloc(), a check must be made on s to ensure it is not zero.

...