This patch resolves an SVACE warning 98434, which is reported by the
INVARIANT_RESULT.OP_ZERO checker.
Change-Id: If2980971cb31a2871e1d8f856c522769708b4315
Signed-off-by: Wook Song <wook16.song@samsung.com>
XMLElement *elem = root->FirstChildElement ("model");
while (elem != nullptr) {
- int priority = elem->IntAttribute ("priority");
- int timeout = elem->IntAttribute ("timeout");
+ int priority = elem->IntAttribute ("priority", -1);
+ int timeout = elem->IntAttribute ("timeout", -1);
if (priority < NPU_PRIORITY_LOW || priority > NPU_PRIORITY_HIGH || timeout < 0)
return -EINVAL;