]> git.sur5r.net Git - openldap/commitdiff
ITS#6356
authorQuanah Gibson-Mount <quanah@openldap.org>
Sat, 31 Oct 2009 01:17:50 +0000 (01:17 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Sat, 31 Oct 2009 01:17:50 +0000 (01:17 +0000)
CHANGES
servers/slapd/bconfig.c

diff --git a/CHANGES b/CHANGES
index 5c5300f2847779d35d77b5968c4c1f9555782394..543ff3a519871f0c78d25eb4522ff8d8e0986769 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,7 @@ OpenLDAP 2.4.20 Engineering
        Fixed slapd inclusion of ac/unistd.h (ITS#6342)
        Fixed slapd debug handling of LDAP_DEBUG_ANY (ITS#6324)
        Fixed slapd termination for one level DNs (ITS#6338)
+       Fixed slapd unused parameter (ITS#6356)
        Fixed slapd-bdb cache corruption (ITS#6341)
        Fixed slapd-ldap leak (ITS#6326)
        Fixed slapd-relay bind segfault (ITS#6337)
index 76d5b853e713a3e41e18bfab4bc33385edb65d33..f68a28f88d3449668bdd4c43a443fd93880eced6 100644 (file)
@@ -2483,7 +2483,7 @@ tcp_buffer_delete( BerVarray vals )
 }
 
 static int
-tcp_buffer_unparse( int idx, int size, int rw, Listener *l, struct berval *val )
+tcp_buffer_unparse( int size, int rw, Listener *l, struct berval *val )
 {
        char buf[sizeof("2147483648")], *ptr;
 
@@ -2528,7 +2528,7 @@ tcp_buffer_unparse( int idx, int size, int rw, Listener *l, struct berval *val )
 }
 
 static int
-tcp_buffer_add_one( int argc, char **argv, int idx )
+tcp_buffer_add_one( int argc, char **argv )
 {
        int rc = 0;
        int size = -1, rw = 0;
@@ -2543,7 +2543,7 @@ tcp_buffer_add_one( int argc, char **argv, int idx )
        }
 
        /* unparse for later use */
-       rc = tcp_buffer_unparse( idx, size, rw, l, &val );
+       rc = tcp_buffer_unparse( size, rw, l, &val );
        if ( rc != LDAP_SUCCESS ) {
                return rc;
        }
@@ -2581,8 +2581,7 @@ tcp_buffer_add_one( int argc, char **argv, int idx )
 
        tcp_buffer = SLAP_REALLOC( tcp_buffer, sizeof( struct berval ) * ( tcp_buffer_num + 2 ) );
        /* append */
-       idx = tcp_buffer_num;
-       tcp_buffer[ idx ] = val;
+       tcp_buffer[ tcp_buffer_num ] = val;
 
        tcp_buffer_num++;
        BER_BVZERO( &tcp_buffer[ tcp_buffer_num ] );
@@ -2627,7 +2626,7 @@ config_tcp_buffer( ConfigArgs *c )
                        }
 
                        /* unparse for later use */
-                       rc = tcp_buffer_unparse( tcp_buffer_num, size, rw, l, &val );
+                       rc = tcp_buffer_unparse( size, rw, l, &val );
                        if ( rc != LDAP_SUCCESS ) {
                                return 1;
                        }
@@ -2660,13 +2659,12 @@ done:;
 
        } else {
                int rc;
-               int idx;
 
-               rc = tcp_buffer_add_one( c->argc - 1, &c->argv[ 1 ], idx );
+               rc = tcp_buffer_add_one( c->argc - 1, &c->argv[ 1 ] );
                if ( rc ) {
                        snprintf( c->cr_msg, sizeof( c->cr_msg ),
                                "<%s> unable to add value #%d",
-                               c->argv[0], idx );
+                               c->argv[0], tcp_buffer_num );
                        Debug( LDAP_DEBUG_ANY, "%s: %s\n",
                                c->log, c->cr_msg, 0 );
                        return 1;