hv: fix 'No brackets to then/else'

- add missing brackets for 'if/else' statements based on MISRA-C
  requirements

v1 -> v2:
 * add brackets for each conditions in 'if' statements to improve
   the readability
 * modify 'ptdev_init' to make the logic clearer

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
Shiqing Gao
2018-09-30 14:04:18 +08:00
committed by wenlingz
parent 71927f3c5b
commit 0317cfb2b6
23 changed files with 131 additions and 72 deletions

View File

@@ -139,8 +139,9 @@ static inline uint64_t ffz64_ex(const uint64_t *addr, uint64_t size)
uint64_t idx;
for (idx = 0UL; (idx << 6U) < size; idx++) {
if (addr[idx] != ~0UL)
if (addr[idx] != ~0UL) {
return (idx << 6U) + ffz64(addr[idx]);
}
}
return size;