From 3250aef49c0158e4d172e3cc6e5e16797e929ae1 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 3 Mar 1999 18:49:59 +0000 Subject: [PATCH] function pointers are incompatible with `void *'; remove NULL or replace with 0 --- servers/slapd/add.c | 2 +- servers/slapd/backend.c | 4 ++-- servers/slapd/bind.c | 2 +- servers/slapd/compare.c | 2 +- servers/slapd/config.c | 4 ++-- servers/slapd/delete.c | 2 +- servers/slapd/modify.c | 2 +- servers/slapd/modrdn.c | 2 +- servers/slapd/search.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/servers/slapd/add.c b/servers/slapd/add.c index 0e8330d762..7dcd020f92 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -115,7 +115,7 @@ do_add( Connection *conn, Operation *op ) * 2) this backend is master for what it holds; * 3) it's a replica and the dn supplied is the updatedn. */ - if ( be->be_add != NULL ) { + if ( be->be_add ) { /* do the update here */ if ( be->be_update_ndn == NULL || strcmp( be->be_update_ndn, op->o_ndn ) == 0 ) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index b59e4c1d58..c0dc0fac91 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -352,7 +352,7 @@ be_db_close( void ) int i; for ( i = 0; i < nbackends; i++ ) { - if ( backends[i].bd_info->bi_db_close != NULL ) { + if ( backends[i].bd_info->bi_db_close ) { (*backends[i].bd_info->bi_db_close)( &backends[i] ); } } @@ -492,7 +492,7 @@ backend_unbind( int i; for ( i = 0; i < nbackends; i++ ) { - if ( backends[i].be_unbind != NULL ) { + if ( backends[i].be_unbind ) { (*backends[i].be_unbind)( &backends[i], conn, op ); } } diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 17790f739f..3e69c967e3 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -196,7 +196,7 @@ do_bind( return; } - if ( be->be_bind != NULL ) { + if ( be->be_bind ) { /* alias suffix */ char *edn; diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index f6675d17ce..45461d5687 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -76,7 +76,7 @@ do_compare( /* alias suffix if approp */ ndn = suffixAlias( ndn, op, be ); - if ( be->be_compare != NULL ) { + if ( be->be_compare ) { (*be->be_compare)( be, conn, op, ndn, &ava ); } else { send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL, diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 74560b5a46..b02313b5ce 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -514,7 +514,7 @@ read_config( char *fname ) /* pass anything else to the current backend info/db config routine */ } else { if ( bi != NULL ) { - if (bi->bi_config == NULL) { + if ( bi->bi_config == 0 ) { Debug( LDAP_DEBUG_ANY, "%s: line %d: unknown directive \"%s\" inside backend info definition (ignored)\n", fname, lineno, cargv[0] ); @@ -526,7 +526,7 @@ read_config( char *fname ) } } } else if ( be != NULL ) { - if ( be->be_config == NULL ) { + if ( be->be_config == 0 ) { Debug( LDAP_DEBUG_ANY, "%s: line %d: unknown directive \"%s\" inside backend database definition (ignored)\n", fname, lineno, cargv[0] ); diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 66f68d9d89..be9b1179ea 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -69,7 +69,7 @@ do_delete( * 2) this backend is master for what it holds; * 3) it's a replica and the dn supplied is the update_ndn. */ - if ( be->be_delete != NULL ) { + if ( be->be_delete ) { /* do the update here */ if ( be->be_update_ndn == NULL || strcmp( be->be_update_ndn, op->o_ndn ) == 0 ) diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 7d07f9cb31..daca60d6e1 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -152,7 +152,7 @@ do_modify( * 2) this backend is master for what it holds; * 3) it's a replica and the dn supplied is the update_ndn. */ - if ( be->be_modify != NULL ) { + if ( be->be_modify ) { /* do the update here */ if ( be->be_update_ndn == NULL || strcmp( be->be_update_ndn, op->o_ndn ) == 0 ) diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 1a446db3bf..f6656d4667 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -79,7 +79,7 @@ do_modrdn( * 2) this backend is master for what it holds; * 3) it's a replica and the dn supplied is the update_ndn. */ - if ( be->be_modrdn != NULL ) { + if ( be->be_modrdn ) { /* do the update here */ if ( be->be_update_ndn == NULL || strcmp( be->be_update_ndn, op->o_ndn ) == 0 ) diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 2779fe0bdd..3c1bce5336 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -145,7 +145,7 @@ do_search( base = suffixAlias ( base, op, be ); /* actually do the search and send the result(s) */ - if ( be->be_search != NULL ) { + if ( be->be_search ) { (*be->be_search)( be, conn, op, base, scope, deref, sizelimit, timelimit, filter, fstr, attrs, attrsonly ); } else { -- 2.39.5