HV:fix simple violations

Fix the violations not touched the logical.
1.Function return value not checked.
2.Logical conjuctions need brackets.
3.No brackets to then/else.
4.Type conversion without cast.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
This commit is contained in:
Huihuang Shi
2019-06-25 14:45:39 +08:00
committed by wenlingz
parent c82e3fd264
commit 3a61530d4e
8 changed files with 17 additions and 13 deletions

View File

@@ -34,8 +34,9 @@ static uint8_t cmos_get_reg_val(uint8_t addr)
spinlock_obtain(&cmos_lock);
/* Make sure an update isn't in progress */
while (cmos_update_in_progress() && tries--)
;
while (cmos_update_in_progress() && (tries != 0)) {
tries -= 1;
}
reg = cmos_read(addr);