On Sat, Apr 27, 2002 at 07:30:51PM -0700, Justin Erenkrantz wrote:
> >   +    qi = apr_palloc(pool, sizeof(*qi));
> >   +    memset(qi, 0, sizeof(*qi));
> 
> As we said, if you are concerned about the performance aspect
> of apr_pcalloc, then we should fix apr_pcalloc NOT attempt to
> work around its inefficiencies by pointedly not using it.
> 
> If/when Cliff (or someone else?) commits the change to apr_pcalloc,
> this chunk would be magically changed along with everything else if
> you simply called apr_pcalloc in the first place.

We don't have a consensus on this, and I'm ambivalent about making the
p_calloc macro. If we do come up with a consensus than it can change.
Until then this is more correct than using p_calloc.

> >   +    rv = apr_thread_mutex_unlock(queue_info->idlers_mutex);
> >   +    if (rv != APR_SUCCESS) {
> >   +        return rv;
> >   +    }
> >   +    return APR_SUCCESS;
> >   +}
> 
> As I said before, simply "return rv;" works here.

Yeah, but this is much more readable.

> >   +        if (rv != APR_SUCCESS) {
> >   +            rv = apr_thread_mutex_unlock(queue_info->idlers_mutex);
> >   +            if (rv != APR_SUCCESS) {
> >   +                return rv;
> >   +            }
> >   +            return rv;
> >   +        }
> 
> Ditto.

This is legit, I'll fix it.

-aaron

Reply via email to