hello *

I'm looking at the code (pdf-alloc.c);  a doubt about pdf_alloc
function. bzr code is

  ...
  pointer = malloc (size);
  if (!pointer && size != 0)
    {
      pointer = NULL;
    }
    ... 

Control flow enter the block if pointer is already NULL, isn't
it? If so the block seems (at least to me) to be useless.  Is it
a placeholder for other things yet to come?

might it be

  if (pointer && size == 0)
    {
      pointer = NULL;
    }

so that pdf_alloc handles this exception (if one ask for 0 heap
bytes) unlike classic malloc (that returns a pointer)?


many thanks and happy gnu year!



Reply via email to