On Thu, Aug 23, 2001 at 11:04:45AM +0200, Sander Striker wrote: > ... > Greg> apr_palloc() will never return NULL. No need for such a complex test. > > It won't? You mean that in httpd there is always an abortfunc present?
There should be an abortfunc, yes. ISTR once looking and finding it wasn't set (but it should). APR and httpd and every other APR user that I'm aware of assume that apr_palloc and friends succeed or abort. Everything is designed and built that way. Thus: until we decide to change that assumption, it is useless clutter to check for NULL results. > Oh, I see, you are saying that _without_ an abort > function it will segfault due to the marked line? I had no idea about that segfault. It is just a typical example of what I described above. We can talk on and on about whether that is "appropriate" or not, but it isn't going to change in any near or mid term that I could imagine. Cheers, -g -- Greg Stein, http://www.lyra.org/
