]> git.sur5r.net Git - openldap/commitdiff
Use strerror()
authorHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:50:12 +0000 (01:50 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:50:12 +0000 (01:50 +0000)
servers/slapd/connection.c
servers/slapd/result.c

index 1599fa5a6996064a0242bb72a3d0b76c26607b64..972a5d0213ba762fabd92f7898322b3ead9b97b6 100644 (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),
index 7b1dc7cb8abdef43fcebda51995db5a1cdcfb4f7..563e83aa35b7a8c44ae53acdf265803279f03500 100644 (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 );