HV: Assignment should not mix with operator

Removed the postfix and prefix operation in assignment expression.
Noncompliant code example:
1) *a++ = *b ++;
2) a = arr[--b];

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-09 16:16:29 -07:00
committed by lijinxia
parent 7ed292eeef
commit 39159ebe16
7 changed files with 43 additions and 20 deletions

View File

@@ -68,7 +68,8 @@ static inline int set_vcpuid_entry(struct vm *vm,
return -ENOMEM;
}
tmp = &vm->vcpuid_entries[vm->vcpuid_entry_nr++];
tmp = &vm->vcpuid_entries[vm->vcpuid_entry_nr];
vm->vcpuid_entry_nr++;
(void)memcpy_s(tmp, entry_size, entry, entry_size);
return 0;
}