X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fsrchpref.c;h=54405e341df20929eb33fb16ceb43b8d775c25ee;hb=1fd3c797a822ac121a481f5ba686779d6e620ed8;hp=64f1c1b1c7dc04100570bfb122176f05606e0985;hpb=1bcec8bf6a17a65396b2c947faed846d20428db9;p=openldap diff --git a/libraries/libldap/srchpref.c b/libraries/libldap/srchpref.c index 64f1c1b1c7..54405e341d 100644 --- a/libraries/libldap/srchpref.c +++ b/libraries/libldap/srchpref.c @@ -20,7 +20,8 @@ #include "portable.h" #include -#include + +#include #include #include @@ -98,14 +99,16 @@ ldap_init_searchprefs( char *file, struct ldap_searchobj **solistp ) 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 ) { @@ -120,8 +123,8 @@ ldap_init_searchprefs_buf( char *buf, long buflen, } 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; @@ -223,7 +226,7 @@ ldap_first_searchobj( struct ldap_searchobj *solist ) 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 ); }