Versions Compared

Key

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

...

The calloc() function ensures that the newly allocated memory has also been cleared. Because sizeof(char) is guaranteed to be 1, this solution does not need to check for a numeric overflow as a result of using calloc() (see MEM07-C. Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t).

...

The calloc() function ensures that the newly allocated memory has also been cleared. Because sizeof(char) is guaranteed to be 1, this solution does not need to check for a numeric overflow as a result of using calloc() (see MEM07-C. Ensure that the arguments to calloc(), when multiplied, can be represented as a size_t).

...