[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc and mint-libs PL46



Chris Ridd <chris@imc.exec.nhs.uk> writes:

|> Chris Herborth wrote:
|>> I'm really amazed (and a little frightened) by the amount of flack we're
|>> getting for suggesting that the libraries be made a little (a very
|>> little!) more robust...  Do all of you always check your paramters
|>> before every system call?  Do all of you always check your return
|>> values?

|> Amen. How much larger would a program be if the libs did the check for
|> NULL (once) instead of the program (many times, potentially)?

Your program has to check for it anyway, so what's the point?  NULL is
*never* a valid pointer, and if you pass it to a function that expects
a valid pointer all bets are off.

Andreas.