]> git.sur5r.net Git - openldap/commitdiff
Do not access a void* (mi_entry_limbo) as if it were a struct monitor_info_t*
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 15 Jun 2007 18:24:01 +0000 (18:24 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 15 Jun 2007 18:24:01 +0000 (18:24 +0000)
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/init.c

index cfb5b80d588162934f2be700cecf44b927dc29ff..6e1ad91793b0d98d00bac7cd7005cb2648d2aa91 100644 (file)
@@ -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;
 
 /*
index 00edb2f56117be2705f8e48c161b74667e1e3154..f45ee21bcb4f24e9a7d3793b66ae7c05ec2f48fe 100644 (file)
@@ -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;