Removing possible infinite loop with while(1) condition
Change-Id: I07a85de3a38fad3265fd8712a8ce1c912fccf690
Signed-off-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11517
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
BrokerID retID = 0;
srand(time(NULL));
- while(1)
+ while((retID==0)||( s_brokerIDMap->find(retID) != s_brokerIDMap->end()))
{
- if(retID != 0 && s_brokerIDMap->find(retID) == s_brokerIDMap->end())
- {
- break;
- }
retID = (unsigned int)rand();
}