> would protect the function for a single case of invalid pointer. But
    > as I mentioned early in C there is not a way (AFAIK) to determine if a
    > pointer is valid or invalid. So you are covering the case list == NULL
    > but not list == 24 (that is likely to be an invalid address) neither
    > list == 25 or list == 1.

   I agree, but my philosophy is, if you can test at least for one
   invalid case, just do it. :-)

I agre in that to check for `list == NULL' increases the robustness of
the code. Anyway, if it is the case then the function documentation
should explicitly say that if the address of the X parameter is NULL
then PDF_EBADDATA is returned in the pdf_status variable.






Reply via email to