Hi,

In the cbmem_init() the mutex lock is initialized then the whole struct is
cleared
https://github.com/apache/incubator-mynewt-core/blob/master/libs/util/src/cb
mem.c#L29

It is not a big deal for now since os_mutex_init() seems to only clear the
os_mutex object. However for the sake of safety, should we memset the struct
first then initializing its member including the c_lock just in case you
guys decide to change the os_mutex_init() implementation later.

Best regards,
Ha Thach


Reply via email to