Fix bug for invalid return variable.
authorKIM JungYong <jyong2.kim@samsung.com>
Sun, 16 Oct 2016 23:13:26 +0000 (08:13 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 19 Oct 2016 09:45:53 +0000 (09:45 +0000)
Invalid return variable is fixed.
1. invalid boolean -> pointer
2. invalid pointer -> boolean

Change-Id: I16cb2338b28ba5bb725ed6eb8d640f04216f7933
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13317
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/consumer/NSConsumerInternalTaskController.c

index fafe0c6..3156979 100644 (file)
@@ -571,14 +571,17 @@ NSMessageStateList * NSGetMessageStateList()
 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)
@@ -597,7 +600,10 @@ NSMessageStateLL * NSFindMessageState(uint64_t msgId)
 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();
@@ -618,7 +624,11 @@ bool NSUpdateMessageState(uint64_t msgId, NSSyncType state)
 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;