]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/value.c
Partial revert of f30269f5d2e4bb5ee7486fe6542078d1b59dba6d
[openldap] / servers / slapd / value.c
index c33ae1afc5bb18ba4a5dcd3d84aa3c1a287edc8f..f5e32587cb89b1bfea83469ec43d845826eb8d0a 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2011 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -469,7 +469,7 @@ ordered_value_pretty(
        struct berval *out,
        void *ctx )
 {
-       struct berval   bv = *val,
+       struct berval   bv,
                        idx = BER_BVNULL;
        int             rc;
 
@@ -478,6 +478,8 @@ ordered_value_pretty(
        assert( val != NULL );
        assert( out != NULL );
 
+       bv = *val;
+
        if ( ad->ad_type->sat_flags & SLAP_AT_ORDERED ) {
 
                /* Skip past the assertion index */
@@ -538,7 +540,7 @@ ordered_value_normalize(
        struct berval *normalized,
        void *ctx )
 {
-       struct berval   bv = *val,
+       struct berval   bv,
                        idx = BER_BVNULL;
        int             rc;
 
@@ -547,6 +549,8 @@ ordered_value_normalize(
        assert( val != NULL );
        assert( normalized != NULL );
 
+       bv = *val;
+
        if ( ad->ad_type->sat_flags & SLAP_AT_ORDERED ) {
 
                /* Skip past the assertion index */