[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: sys_errlist deprecated? (ITS#3111)

Howard Chu wrote:

>I'm not fond of the strerror_r juggling either.
>I note that there's only a few places where STRERROR is used.
>In liblber/sockbuf.c I think we should remove it and just log the errno.
>liblber should not have any thread library dependencies.
>In libldap/os-local.c I'm tempted to remove it as well.
If there's no objection, I'll clean things up, removing all unnecessary
calls to STRERROR, using your workaround where its use might be
of help.

>In libldap/util-int.c the STRERROR(ENOMEM) could just have been the literal
>"Out of Memory". No reason to use it there.

I've checked: all times the only function that ends up using STRERROR(),
i.e. ldap_pvt_get_hname(), any time it's called the value of the error 
is simply ignored, so I allowed to pass a NULL pointer to the error message,
resulting in no call to STRERROR().

>In slapd STRERROR is called from sock_errstr(). All of the invocations are in
>a single thread except slapd/result.c. I would remove it from there, and then
>there are no reentrancy issues anywhere else in slapd.
>Just my $0.02...
I'm wasting time on this because a customer complained
about the gcc warnings...


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497