security: Return error if invalid parameters as provided as input
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 24 Mar 2017 10:26:09 +0000 (11:26 +0100)
committerRandeep Singh <randeep.s@samsung.com>
Thu, 30 Mar 2017 08:21:34 +0000 (08:21 +0000)
This warning was observed with clang on GNU/Linux:

  resource/csdk/security/src/psinterface.c:80:9: \
  warning: expression result unused [-Wunused-value]
  OC_STACK_INVALID_PARAM;

Change-Id: I91b17533ddcf04ba7576a4162f4af4e45755fbb9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18159
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/psinterface.c

index 3499527..02d208f 100644 (file)
@@ -77,7 +77,7 @@ static OCStackResult WritePayloadToPS(const char *databaseName, uint8_t *payload
 {
     if (!databaseName || !payload || (size <= 0))
     {
-        OC_STACK_INVALID_PARAM;
+        return OC_STACK_INVALID_PARAM;
     }
 
     OCStackResult result = OC_STACK_ERROR;