Combining assignment with an if() condition test is prone to
errors in maintenance, triggers compile warnings and complicates
debugging.
Also fixed missing EOL at EOF.
Change-Id: I6691fdc4de915c5c95d0fa58997398e6028beaa6
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1290
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
PMRESULT Config::getXmlData(xml_node<> *pluginInfo, std::string key)
{
- xml_attribute<> *iAttr = NULL;
std::string value = "";
- if (iAttr = pluginInfo->first_attribute(key.c_str()))
+ xml_attribute<> *iAttr = pluginInfo->first_attribute(key.c_str());
+ if (iAttr)
{
value = iAttr->value();
setValue(key, value);
{
return "";
}
-}
\ No newline at end of file
+}