notification: Fix wrong NULL affectation 27/22027/2
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 20 Jul 2017 11:17:59 +0000 (13:17 +0200)
committerUze Choi <uzchoi@samsung.com>
Tue, 26 Sep 2017 11:26:13 +0000 (11:26 +0000)
To numbers or pthread type

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: Id0e1354608f83553cc84cc855becf46ced3d0cd2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21565
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit a389836e1991a57f7cb74198209dc8a375654a36)

service/notification/examples/linux/notificationconsumer.c
service/notification/src/consumer/NSConsumerCommon.c
service/notification/src/consumer/NSConsumerCommunication.c

index b25e60a..3036313 100644 (file)
@@ -148,7 +148,7 @@ void input(char * buffer)
 int main(void)
 {
     bool isExit = false;
-    pthread_t OCThread = NULL;
+    pthread_t OCThread;
 
     printf("start Iotivity\n");
 
index 1fe086a..42a65a3 100644 (file)
@@ -339,7 +339,7 @@ static OCRepPayload * NSGetExtraInfo(OCRepPayload * payload)
 NSMessage * NSGetMessage(OCRepPayload * payload)
 {
     NS_LOG(DEBUG, "get msg id");
-    uint64_t id = NULL;
+    uint64_t id = 0;
     bool getResult = OCRepPayloadGetPropInt(payload, NS_ATTRIBUTE_MESSAGE_ID, (int64_t *)&id);
     NS_VERIFY_NOT_NULL(getResult == true ? (void *) 1 : NULL, NULL);
 
index 38a022e..e2e6a0f 100644 (file)
@@ -224,7 +224,7 @@ NSSyncInfo * NSGetSyncInfoc(OCClientResponse * clientResponse)
     OCRepPayload * payload = (OCRepPayload *)clientResponse->payload;
 
     NS_LOG(DEBUG, "get msg id");
-    uint64_t id = NULL;
+    uint64_t id = 0;
     bool getResult = OCRepPayloadGetPropInt(payload, NS_ATTRIBUTE_MESSAGE_ID, (int64_t *)&id);
     NS_VERIFY_NOT_NULL(getResult == true ? (void *) 1 : NULL, NULL);