From: Howard Chu Date: Sun, 29 Aug 1999 01:50:12 +0000 (+0000) Subject: Use strerror() X-Git-Tag: TWEB_OL_BASE~90 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a60406860f7b0b4562a9e49eb22525727cc3ea65;p=openldap Use strerror() --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 1599fa5a69..972a5d0213 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -921,8 +921,7 @@ connection_input( Debug( LDAP_DEBUG_TRACE, "ber_get_next on fd %d failed errno=%d (%s)\n", - ber_pvt_sb_get_desc( conn->c_sb ), err, - err > -1 && err < sys_nerr ? sys_errlist[err] : "unknown" ); + ber_pvt_sb_get_desc( conn->c_sb ), err, strerror(err) ); Debug( LDAP_DEBUG_TRACE, "\t*** got %ld of %lu so far\n", (long)(conn->c_currentber->ber_rwptr - conn->c_currentber->ber_buf), diff --git a/servers/slapd/result.c b/servers/slapd/result.c index 7b1dc7cb8a..563e83aa35 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -186,8 +186,7 @@ static long send_ldap_ber( */ Debug( LDAP_DEBUG_CONNS, "ber_flush failed errno=%d reason=\"%s\"\n", - err, err > -1 && err < sys_nerr ? sys_errlist[err] - : "unknown", 0 ); + err, strerror(err) ); if ( err != EWOULDBLOCK && err != EAGAIN ) { connection_closing( conn );