+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
/* attr.c - routines for dealing with attributes */
#include "portable.h"
#include <sys/param.h>
#endif
-#include "ldap_defaults.h"
+#include "ldap_pvt.h"
#include "slap.h"
#ifdef LDAP_DEBUG
for( i=0; a->a_vals[i] != NULL; i++ ) {
tmp->a_vals[i] = ber_bvdup( a->a_vals[i] );
+
+ if( tmp->a_vals[i] == NULL ) break;
}
tmp->a_vals[i] = NULL;
{
assert( s != NULL );
- return( str2lower( s ) );
+ return( ldap_pvt_str2lower( s ) );
}
/*
Attribute *
attr_find(
Attribute *a,
- char *type
+ const char *type
)
{
for ( ; a != NULL; a = a->a_next ) {
int
attr_delete(
Attribute **attrs,
- char *type
+ const char *type
)
{
Attribute **a;
void
attr_syntax_config(
- char *fname,
+ const char *fname,
int lineno,
int argc,
char **argv
val.bv_val = ldap_attributetype2str( &at->sat_atype );
if ( val.bv_val ) {
val.bv_len = strlen( val.bv_val );
- Debug( LDAP_DEBUG_TRACE, "Merging at [%d] %s\n",
- val.bv_len, val.bv_val, 0 );
+ Debug( LDAP_DEBUG_TRACE, "Merging at [%ld] %s\n",
+ (long) val.bv_len, val.bv_val, 0 );
attr_merge( e, "attributeTypes", vals );
ldap_memfree( val.bv_val );
} else {