mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: coding style clean-up related to Boolean
While following two styles are both correct, the 2nd one is simpler. bool is_level_triggered; 1. if (is_level_triggered == true) {...} 2. if (is_level_triggered) {...} This patch cleans up the style in hypervisor. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -295,7 +295,7 @@ void write_sriov_cap_reg(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes,
|
||||
if (reg == PCIR_SRIOV_CONTROL) {
|
||||
bool enable;
|
||||
|
||||
enable = (((val & PCIM_SRIOV_VF_ENABLE) != 0U) ? true : false);
|
||||
enable = ((val & PCIM_SRIOV_VF_ENABLE) != 0U);
|
||||
if (enable != is_vf_enabled(vdev)) {
|
||||
if (enable) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user