From: Hallvard Furuseth Date: Fri, 15 Jun 2007 18:24:01 +0000 (+0000) Subject: Do not access a void* (mi_entry_limbo) as if it were a struct monitor_info_t* X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~380 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b20c1fe5affdda9c910006a2fd482035b93b76e9;p=openldap Do not access a void* (mi_entry_limbo) as if it were a struct monitor_info_t* --- diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index cfb5b80d58..6e1ad91793 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -74,6 +74,8 @@ typedef struct monitor_entry_t { struct monitor_callback_t *mp_cb; /* callback sequence */ } monitor_entry_t; +struct entry_limbo_t; /* in init.c */ + typedef struct monitor_info_t { /* @@ -135,7 +137,7 @@ typedef struct monitor_info_t { AttributeDescription *mi_ad_readOnly; AttributeDescription *mi_ad_restrictedOperation; - void *mi_entry_limbo; + struct entry_limbo_t *mi_entry_limbo; } monitor_info_t; /* diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 00edb2f561..f45ee21bcb 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -357,7 +357,7 @@ monitor_back_register_database_limbo( el.el_be = be; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) /* go to last */; @@ -529,7 +529,7 @@ done:; el.el_mss = mss; el.el_flags = flags; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) /* go to last */; @@ -743,7 +743,7 @@ done:; el.el_mss = mss; el.el_flags = flags; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) /* go to last */; @@ -1076,7 +1076,7 @@ done:; el.el_a = attrs_dup( a ); el.el_cb = cb; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) /* go to last */; @@ -1189,7 +1189,7 @@ monitor_back_unregister_entry( } else { entry_limbo_t **elpp; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) { @@ -1320,7 +1320,7 @@ monitor_back_unregister_entry_parent( } else { entry_limbo_t **elpp; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) { @@ -1501,7 +1501,7 @@ monitor_back_unregister_entry_attrs( } else { entry_limbo_t **elpp; - for ( elpp = (entry_limbo_t **)&mi->mi_entry_limbo; + for ( elpp = &mi->mi_entry_limbo; *elpp; elpp = &(*elpp)->el_next ) { @@ -2321,7 +2321,7 @@ monitor_back_db_open( monitor_subsys_opened = 1; if ( mi->mi_entry_limbo ) { - entry_limbo_t *el = (entry_limbo_t *)mi->mi_entry_limbo; + entry_limbo_t *el = mi->mi_entry_limbo; for ( ; el; ) { entry_limbo_t *tmp;