[IOT-2741] Static Analysis warning fixes. 29/22329/7
authorarya.k <arya.kumar@samsung.com>
Wed, 6 Sep 2017 05:10:24 +0000 (10:40 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 12 Oct 2017 05:29:31 +0000 (05:29 +0000)
Indentation fixes.

Change-Id: I44a6d21a70fba9d8bdb40972c93d78a778c2ee41
Signed-off-by: arya.k <arya.kumar@samsung.com>
resource/csdk/connectivity/common/inc/cacommonutil.h
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/ocpayload.c

index 59be952..d7abf2d 100644 (file)
@@ -83,7 +83,8 @@ extern "C"
  * @param  log_message  log message
  */
 #define VERIFY_NON_NULL_VOID(arg, log_tag, log_message) \
-    if (NULL == (arg)) { \
+    if (NULL == (arg)) \
+    { \
         OIC_LOG_V(ERROR, (log_tag), "Invalid input:%s", (log_message)); \
         return; \
     } \
index 187290c..62640f1 100644 (file)
@@ -333,7 +333,10 @@ exit:
 static bool addPolicyPayload(OCResourceHandle* resourceHandle, OCDevAddr* devAddr,
                              bool isOCFContentFormat, OCRepPayload** outPolicy)
 {
-    if (resourceHandle == NULL || devAddr == NULL || outPolicy == NULL) return false;
+    if (resourceHandle == NULL || devAddr == NULL || outPolicy == NULL)
+    {
+        return false;
+    }
 
     OCResourceProperty p = OCGetResourceProperties(resourceHandle);
     OCRepPayload* policy = OCRepPayloadCreate();
@@ -436,7 +439,10 @@ static bool translateEndpointsPayload(OCEndpointPayload* epPayloadOrg,
     *outArrayPayload = arrayPayload;
 exit:
     OCEndpointPayloadDestroy(epPayloadOrg);
-    if (result == false) OICFree(arrayPayload);
+    if (result == false)
+    {
+        OICFree(arrayPayload);
+    }
     return result;
 }
 
index ff6562b..0f64205 100644 (file)
@@ -1893,7 +1893,10 @@ OCEndpointPayload* CreateEndpointPayloadList(const OCResource *resource, const O
                         lastNode->next = tmpNode;
                         lastNode = tmpNode;
                     }
-                    if (epSize != NULL) (*epSize)++;
+                    if (epSize != NULL)
+                    {
+                        (*epSize)++;
+                    }
                 }
             }
             else
@@ -2261,7 +2264,9 @@ OCRepPayload** OC_CALL OCLinksPayloadArrayCreate(const char* resourceUri,
     {
         bool isOCFContentFormat = false;
         if (!OCRequestIsOCFContentFormat(ehRequest, &isOCFContentFormat))
+        {
             return NULL;
+        }
 
         linksRepPayloadArray = BuildCollectionLinksPayloadArray(resourceUri,
                                                                 isOCFContentFormat,