osaf/libs/core/include/ncs_tmr.h |   3 ---
 osaf/libs/core/leap/hj_tmr.c     |  11 +++++------
 2 files changed, 5 insertions(+), 9 deletions(-)


diff --git a/osaf/libs/core/include/ncs_tmr.h b/osaf/libs/core/include/ncs_tmr.h
--- a/osaf/libs/core/include/ncs_tmr.h
+++ b/osaf/libs/core/include/ncs_tmr.h
@@ -76,9 +76,6 @@ extern "C" {
                uint32_t svc_sub_id;
        } NCS_RP_TMR_INIT;
 
-#define m_IS_TIME_STAMP_SAME(dest_tmr, src_tmr) memcmp (&dest_tmr, &src_tmr, 
sizeof(time_t))
-#define m_RP_TMR_ALLOC(size, svc_id, sub_svc_id) m_NCS_MEM_ALLOC(size, 
NCS_MEM_REGION_PERSISTENT, svc_id, sub_svc_id)
-#define m_RP_TMR_FREE(ptr, svc_id, sub_svc_id) m_NCS_MEM_FREE(ptr, 
NCS_MEM_REGION_PERSISTENT, svc_id, sub_svc_id)
 
 #undef RP_LOG_ENB
 #ifdef RP_LOG_ENB
diff --git a/osaf/libs/core/leap/hj_tmr.c b/osaf/libs/core/leap/hj_tmr.c
--- a/osaf/libs/core/leap/hj_tmr.c
+++ b/osaf/libs/core/leap/hj_tmr.c
@@ -105,8 +105,7 @@ NCS_RP_TMR_CB *ncs_rp_tmr_init(NCS_RP_TM
 {
        NCS_RP_TMR_CB *tmr_cb;
 
-       tmr_cb = (NCS_RP_TMR_CB *)m_RP_TMR_ALLOC(sizeof(NCS_RP_TMR_CB), 
tmr_init_info->svc_id,
-                                                tmr_init_info->svc_sub_id);
+       tmr_cb = (NCS_RP_TMR_CB *)malloc(sizeof(NCS_RP_TMR_CB));
 
        if (tmr_cb == NULL) {
                m_RP_TMR_LOG_MSG("ncs_rp_tmr_init Os alloc failed", 0);
@@ -145,7 +144,7 @@ NCS_RP_TMR_HDL ncs_rp_tmr_create(NCS_RP_
        NCS_RP_TMR_INFO *tmr_info;
 
        /* allocate an leaf node and add it to the bucket */
-       tmr_info = (NCS_RP_TMR_INFO *)m_RP_TMR_ALLOC(sizeof(NCS_RP_TMR_INFO), 
tmr_cb->svc_id, tmr_cb->svc_sub_id);
+       tmr_info = (NCS_RP_TMR_INFO *)malloc(sizeof(NCS_RP_TMR_INFO));
 
        if (tmr_info == NULL) {
                m_RP_TMR_LOG_MSG("ncs_rp_tmr_start NCS_RP_TMR_INFO OS alloc 
failed", 0);
@@ -403,7 +402,7 @@ uint32_t ncs_rp_tmr_delete(NCS_RP_TMR_CB
                        m_RP_TMR_LOG_MSG("ncs_rp_tmr_delete timer timer is not 
stoped", tmr_info);
                        ncs_rp_tmr_stop(tmr_cb, tmr_id);
                }
-               m_RP_TMR_FREE(tmr_info, tmr_cb->svc_id, tmr_cb->svc_sub_id);
+               free(tmr_info);
        } while (0);
        m_NCS_UNLOCK(&tmr_cb->tmr_lock, NCS_LOCK_WRITE);
        return (res);
@@ -440,7 +439,7 @@ uint32_t ncs_rp_tmr_destory(NCS_RP_TMR_C
                pres_tmr_info = tmr_info;
                for (; tmr_info != NULL;) {
                        tmr_info = tmr_info->pnext;
-                       m_RP_TMR_FREE(pres_tmr_info, tmr_cb->svc_id, 
tmr_cb->svc_sub_id);
+                       free(pres_tmr_info);
                        pres_tmr_info = tmr_info;
                }
 
@@ -449,7 +448,7 @@ uint32_t ncs_rp_tmr_destory(NCS_RP_TMR_C
        /* destroy the lock */
        m_NCS_LOCK_DESTROY(&tmr_cb->tmr_lock);
        /* free the RP control block */
-       m_RP_TMR_FREE(tmr_cb, tmr_cb->svc_id, tmr_cb->svc_sub_id);
+       free(tmr_cb);
        *pptmr_cb = NULL;
        return (NCSCC_RC_SUCCESS);
 }

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to