On 22 Jun 2021, at 16:39, Yann Ylavic <ylavic....@gmail.com> wrote:

> Maybe use :
>           apr_status_t rv = APR_ENOTIMPL;
>           char *buffer = apr_psprintf(pool, "%pm", &rv);
> 
> to avoid arbitrary ERROR_SIZE allocation?

Pulled on a thread with this one.

The function apr_dso_error() returns a standard APR error on win32, but a 
dedicated error string on unix, so %pm won't work in this case.

It will work in the apr_strerror() case - while it's tempting to keep them 
consistent, we are saving bytes, so +1.

http://svn.apache.org/viewvc?rev=1890980&view=rev 
<http://svn.apache.org/viewvc?rev=1890980&view=rev>

Regards,
Graham
—

Reply via email to