]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/memory.c
Fix typo
[openldap] / libraries / liblber / memory.c
index fb68dd5c14847b40475c9d2382e4fe93ee91feb7..5b90650868ba19b1f64f7813d2f3e7144b38c6f8 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 #include "portable.h"
@@ -53,7 +53,7 @@ struct ber_mem_hdr {
 };
 
 /* Pattern at top of allocated space */
-#define LLBER_MEM_JUNK 0xdeaddadaU
+#define LBER_MEM_JUNK 0xdeaddadaU
 
 static const struct ber_mem_hdr ber_int_mem_hdr = { LBER_MEM_JUNK, 0, 0 };
 
@@ -681,7 +681,7 @@ ber_bvarray_add( BerVarray *a, BerValue *bv )
                }
 
        } else {
-               BerVarray *atmp;
+               BerVarray atmp;
                BER_MEM_VALID( a );
 
                for ( n = 0; *a != NULL && (*a)[n].bv_val != NULL; n++ ) {
@@ -692,14 +692,14 @@ ber_bvarray_add( BerVarray *a, BerValue *bv )
                        return n;
                }
 
-               *atmp = (BerValue *) LBER_REALLOC( (char *) *a,
+               atmp = (BerValue *) LBER_REALLOC( (char *) *a,
                    (n + 2) * sizeof(BerValue) );
 
-               if( *atmp == NULL ) {
+               if( atmp == NULL ) {
                        return -1;
                }
 
-               *a = *atmp;
+               *a = atmp;
        }
 
        (*a)[n++] = *bv;