httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: cvs commit: apache-2.0/src/lib/apr/misc/unix errorcodes.c
Date Mon, 29 May 2000 04:22:04 GMT
> From: rbb@covalent.net [mailto:rbb@covalent.net]
> Sent: Sunday, May 28, 2000 11:18 PM

>    static char *apr_error_string(ap_status_t statcode)
>    {
>   +    char buf[256];

>        case APR_EDSOOPEN:
> >   -        return ap_dso_error();
> >   +        return ap_dso_error(buf, sizeof(buf), APR_EDSOOPEN);
> > 
> > If you mean to allow the ap_dso_error call to return it's result
> > in buf, we just off the result from the stack frame :-)
> 
> buf will work just fine if the OS requires buf.  If not, we 
> ignore it.  In
> the case of Unix, we don't need the buff.  On other platforms 
> we may need
> it.
> 
> This patch should work just fine.  But, I really don't care anymore.

If we need the buf for the error message, we just allocated it on
the stack, and then we blew off our stack as we return the error.
That's what I ment.  I wasn't aware Unix didn't use it.

Mime
View raw message