]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/attr.c
ITS#6101: Move sru_search first in union SlapReply.sr_un, for initialization.
[openldap] / servers / slapd / attr.c
index 67c26911c2ef8dc1755fc566568dcf0825319386..9f90dd58b33055f7026b68a4418f09b6f166d4a2 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -213,7 +213,7 @@ attr_dup2( Attribute *tmp, Attribute *a )
 {
        tmp->a_flags = a->a_flags & SLAP_ATTR_PERSISTENT_FLAGS;
        if ( a->a_vals != NULL ) {
-               int     i;
+               unsigned        i, j;
 
                tmp->a_numvals = a->a_numvals;
                tmp->a_vals = ch_malloc( (tmp->a_numvals + 1) * sizeof(struct berval) );
@@ -228,7 +228,6 @@ attr_dup2( Attribute *tmp, Attribute *a )
                assert( a->a_nvals != NULL );
 
                if ( a->a_nvals != a->a_vals ) {
-                       int     j;
 
                        tmp->a_nvals = ch_malloc( (tmp->a_numvals + 1) * sizeof(struct berval) );
                        for ( j = 0; !BER_BVISNULL( &a->a_nvals[j] ); j++ ) {