apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr/locks/unix locks.c
Date Tue, 05 Jun 2001 18:58:25 GMT
On Tue, 5 Jun 2001, Ben Laurie wrote:


> >    apr_status_t apr_os_lock_put(apr_lock_t **lock, apr_os_lock_t *thelock,
> >                               apr_pool_t *pool)
> >    {
> >   -    if (cont == NULL) {
> >   +    if (pool == NULL) {
> >            return APR_ENOPOOL;
> >        }
> >        if ((*lock) == NULL) {
>
> Isn't this another example where we should just die instead of returning
> an error?

I think so, yes.  Many of the APR_ENOfoo codes are on my hit-list.  =-)

For example:

 * APR_ENOPOOL      APR was not provided a pool with which to allocate memory
 * APR_ENOFILE      APR was not given a file structure
 * APR_ENOPROC      APR was not given a process structure
 * APR_ENOTIME      APR was not given a time structure
 * APR_ENODIR       APR was not given a directory structure
 * APR_ENOLOCK      APR was not given a lock structure
 * APR_ENOPOLL      APR was not given a poll structure
 * APR_ENOSOCKET    APR was not given a socket
 * APR_ENOTHREAD    APR was not given a thread structure
 * APR_ENOTHDKEY    APR was not given a thread key structure

I'm equally hostile toward five or six of the other codes in there as
well, but these are a good enough example.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




Mime
View raw message