#include "portable.h"
#include <stdio.h>
-#include <stdlib.h>
+
+#include <ac/stdlib.h>
#include <ac/ctype.h>
#include <ac/string.h>
int
-ldap_init_searchprefs_buf( char *buf, long buflen,
+ldap_init_searchprefs_buf(
+ char *buf,
+ ber_len_t buflen,
struct ldap_searchobj **solistp )
{
int rc = -1, version;
char **toks;
struct ldap_searchobj *prevso, *so;
- *solistp = prevso = NULLSEARCHOBJ;
+ *solistp = prevso = NULL;
if ( next_line_tokens( &buf, &buflen, &toks ) != 2 ||
strcasecmp( toks[ 0 ], "version" ) != 0 ) {
}
while ( buflen > 0 && ( rc = read_next_searchobj( &buf, &buflen, &so,
- version )) == 0 && so != NULLSEARCHOBJ ) {
- if ( prevso == NULLSEARCHOBJ ) {
+ version )) == 0 && so != NULL ) {
+ if ( prevso == NULL ) {
*solistp = so;
} else {
prevso->so_next = so;
struct ldap_searchobj *
ldap_next_searchobj( struct ldap_searchobj *solist, struct ldap_searchobj *so )
{
- return( so == NULLSEARCHOBJ ? so : so->so_next );
+ return( so == NULL ? so : so->so_next );
}