]> git.sur5r.net Git - openldap/blobdiff - contrib/slapd-modules/autogroup/autogroup.c
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / contrib / slapd-modules / autogroup / autogroup.c
index c9ebe014d5324d93384a8fcc11fcb19b9371788c..0be0f281f3fd38b8b22caa4d77a5a625610ee25b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2007-2012 The OpenLDAP Foundation.
+ * Copyright 2007-2013 The OpenLDAP Foundation.
  * Portions Copyright 2007 Michał Szulczyński.
  * Portions Copyright 2009 Howard Chu.
  * All rights reserved.
@@ -331,6 +331,7 @@ autogroup_member_search_cb( Operation *op, SlapReply *rs )
                const char              *text = NULL;
                char                    textbuf[1024];
                struct berval           *vals, *nvals;
+               struct berval           lvals[ 2 ], lnvals[ 2 ];
                int                     numvals;
 
                Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_cb <%s>\n",
@@ -347,7 +348,6 @@ autogroup_member_search_cb( Operation *op, SlapReply *rs )
                                return 0;
                        }
                } else {
-                       struct berval           lvals[ 2 ], lnvals[ 2 ];
                        lvals[ 0 ] = rs->sr_entry->e_name;
                        BER_BVZERO( &lvals[ 1 ] );
                        lnvals[ 0 ] = rs->sr_entry->e_nname;
@@ -387,6 +387,7 @@ autogroup_member_search_modify_cb( Operation *op, SlapReply *rs )
                autogroup_filter_t      *agf = agg->agg_filter;
                Modifications           *modlist;
                struct berval           *vals, *nvals;
+               struct berval           lvals[ 2 ], lnvals[ 2 ];
                int                     numvals;
 
                Debug(LDAP_DEBUG_TRACE, "==> autogroup_member_search_modify_cb <%s>\n",
@@ -403,7 +404,6 @@ autogroup_member_search_modify_cb( Operation *op, SlapReply *rs )
                                return 0;
                        }
                } else {
-                       struct berval           lvals[ 2 ], lnvals[ 2 ];
                        lvals[ 0 ] = rs->sr_entry->e_name;
                        BER_BVZERO( &lvals[ 1 ] );
                        lnvals[ 0 ] = rs->sr_entry->e_nname;