Use strerror()

This commit is contained in:
Howard Chu 1999-08-29 01:50:12 +00:00
parent ac09c64f5c
commit a60406860f
2 changed files with 2 additions and 4 deletions

View File

@ -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),

View File

@ -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 );