]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/attr.c
Code clean-up.
[openldap] / servers / slapd / attr.c
index 99cd92b2cad32406e94da37b251056adfd08722f..0d696dc02486058b66e229ebe802f936dbba74b9 100644 (file)
@@ -9,6 +9,7 @@
 #endif
 
 #include <ac/ctype.h>
+#include <ac/errno.h>
 #include <ac/socket.h>
 #include <ac/string.h>
 #include <ac/time.h>
@@ -21,8 +22,6 @@
 
 #include "slap.h"
 
-extern int     errno;
-
 void
 attr_free( Attribute *a )
 {
@@ -78,7 +77,7 @@ attr_merge_fast(
 
        if ( **a == NULL ) {
                **a = (Attribute *) ch_malloc( sizeof(Attribute) );
-               (**a)->a_type = attr_normalize( strdup( type ) );
+               (**a)->a_type = attr_normalize( ch_strdup( type ) );
                (**a)->a_vals = NULL;
                (**a)->a_syntax = attr_syntax( type );
                (**a)->a_next = NULL;
@@ -113,7 +112,7 @@ attr_merge(
 
        if ( *a == NULL ) {
                *a = (Attribute *) ch_malloc( sizeof(Attribute) );
-               (*a)->a_type = attr_normalize( strdup( type ) );
+               (*a)->a_type = attr_normalize( ch_strdup( type ) );
                (*a)->a_vals = NULL;
                (*a)->a_syntax = attr_syntax( type );
                (*a)->a_next = NULL;