Moved NULL checking macro invocation for pointer variable
before it gets dereferenced.
Change-Id: I303e56ae1e856991f44373e06c5adc156515107a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22273
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit
578ba07661d943e42762745daaeeaea89fc9604e)
OCRepPayload *temp = NULL;
OCRepPayload *rootPayload = NULL;
OCRepPayload *curPayload = NULL;
- CborValue rootMap = *root;
+ CborValue rootMap;
VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid Parameter outPayload");
VERIFY_PARAM_NON_NULL(TAG, root, "Invalid Parameter root");
+ rootMap = *root;
*outPayload = NULL;
if (cbor_value_is_array(root))
{