Hi Vu,

I used osaf_clock_gettime() since it's used some places already in current code 
file.
E.g: Line 626, Line 638. I think we keep use it to easy for code reading.
Or we have to change all osaf_clock_gettime() calls in current code file.

Best Regards,
ThuanTr

-----Original Message-----
From: Nguyen Minh Vu <vu.m.ngu...@dektech.com.au> 
Sent: Tuesday, November 19, 2019 10:01 AM
To: thuan.tran <thuan.t...@dektech.com.au>; 'Minh Hon Chau' 
<minh.c...@dektech.com.au>; gary....@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/1] imm: Fix coding issues identified by codechecker 
[#3115]

Hi Thuan,

Ack with a minor comment.

Regards,

On 11/4/19 2:57 PM, thuan.tran wrote:
> ---
>   src/imm/agent/imma_db.cc   | 2 +-
>   src/imm/immnd/immnd_main.c | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/imm/agent/imma_db.cc b/src/imm/agent/imma_db.cc
> index 071edbe74..80637e55f 100644
> --- a/src/imm/agent/imma_db.cc
> +++ b/src/imm/agent/imma_db.cc
> @@ -621,7 +621,7 @@ int imma_oi_ccb_record_note_callback(IMMA_CLIENT_NODE 
> *cl_node,
>         rs = 1;
>       }
>     }
> -  if (callback) {
> +  if (tmp && callback) {
>       if (callback->type == IMMA_CALLBACK_OI_CCB_CREATE && 
> !(tmp->adminOwner)) {
>         SaImmAttrValuesT_2 **attributes =
>             (SaImmAttrValuesT_2 **)callback->attrValsForCreateUc;
> diff --git a/src/imm/immnd/immnd_main.c b/src/imm/immnd/immnd_main.c
> index 5280f0599..62c7b2478 100644
> --- a/src/imm/immnd/immnd_main.c
> +++ b/src/imm/immnd/immnd_main.c
> @@ -489,6 +489,7 @@ int main(int argc, char *argv[])
>       fds[FD_CLM_INIT].fd = immnd_cb->clm_init_sel_obj.rmv_obj;
>       fds[FD_CLM_INIT].events = POLLIN;
>   
> +     osaf_clock_gettime(CLOCK_MONOTONIC, &start_time);
[Vu]  Is it better to use the one provided by base as below?
struct timespec start_time = base::ReadMonotonicClock()


>       while (1) {
>               /* Watch out for performance bug. Possibly change from
>                  event-count to recalculated timer. */




_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to