Change-Id: I5ae6cbe8e62e5b0aeb0dd34a5d239cc7761b2ea9
Signed-off-by: youngman <yman.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10331
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Youngjae Shin <yj99.shin@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
* @return true when deletion is happened, false when no deletion is occured. In case either of
* two arguments is null it will return false.
*/
* @return true when deletion is happened, false when no deletion is occured. In case either of
* two arguments is null it will return false.
*/
-bool PMDeleteFromUUIDList(OCUuidList_t *pUuidList, OicUuid_t *targetId);
+bool PMDeleteFromUUIDList(OCUuidList_t **pUuidList, OicUuid_t *targetId);
size_t deleteCnt = 0;
while (pCurDev)
{
size_t deleteCnt = 0;
while (pCurDev)
{
- if(true == PMDeleteFromUUIDList(uuidList, &pCurDev->doxm->deviceID))
+ if(true == PMDeleteFromUUIDList(&uuidList, &pCurDev->doxm->deviceID))
-bool PMDeleteFromUUIDList(OCUuidList_t *pUuidList, OicUuid_t *targetId)
+bool PMDeleteFromUUIDList(OCUuidList_t **pUuidList, OicUuid_t *targetId)
- if(pUuidList == NULL || targetId == NULL)
+ if(*pUuidList == NULL || targetId == NULL)
{
return false;
}
OCUuidList_t *tmp1 = NULL,*tmp2=NULL;
{
return false;
}
OCUuidList_t *tmp1 = NULL,*tmp2=NULL;
- LL_FOREACH_SAFE(pUuidList, tmp1, tmp2)
+ LL_FOREACH_SAFE(*pUuidList, tmp1, tmp2)
{
if(0 == memcmp(tmp1->dev.id, targetId->id, sizeof(targetId->id)))
{
{
if(0 == memcmp(tmp1->dev.id, targetId->id, sizeof(targetId->id)))
{
- LL_DELETE(pUuidList, tmp1);
+ LL_DELETE(*pUuidList, tmp1);
OICFree(tmp1);
return true;
}
OICFree(tmp1);
return true;
}