NSMessageStateLL * NSFindMessageState(uint64_t msgId)
{
NS_LOG_V(DEBUG, "%s", __func__);
- if (msgId <= NS_RESERVED_MESSAGEID) return NULL;
+ if (msgId <= NS_RESERVED_MESSAGEID)
+ {
+ return NULL;
+ }
NSMessageStateLL * iter = NULL;
NSLockMessageListMutex();
if (NSGetMessageStateList()->head == NULL)
{
NSUnlockMessageListMutex();
- return false;
+ return NULL;
}
for (iter = NSGetMessageStateList()->head; iter; iter = iter->next)
bool NSUpdateMessageState(uint64_t msgId, NSSyncType state)
{
NS_LOG_V(DEBUG, "%s", __func__);
- if (msgId <= NS_RESERVED_MESSAGEID) return NULL;
+ if (msgId <= NS_RESERVED_MESSAGEID)
+ {
+ return false;
+ }
NSMessageStateLL * iter = NULL;
NSLockMessageListMutex();
bool NSDeleteMessageState(uint64_t msgId)
{
NS_LOG_V(DEBUG, "%s", __func__);
- if (msgId <= NS_RESERVED_MESSAGEID) return NULL;
+ if (msgId <= NS_RESERVED_MESSAGEID)
+ {
+ return false;
+ }
+
NSMessageStateLL * iter = NULL;
NSMessageStateLL * prev = NULL;