Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: eliminate alloc from 1st compliant example

...

Code Block
bgColor#ccccff
enum { BLOCKSIZE = 16 };
...
void *AllocBlocks(size_t cBlocks) {
  size_t alloc;

  if (cBlocks == 0 || cBlocks > SIZE_MAX / BLOCKSIZE) return NULL;
  return malloc (cBlocks * BLOCKSIZE);
} /* end AllocBlocks */

...