Re: [PATCH] KVM: cleanup: change to use bool return values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/15/2010 10:23 AM, Gui Jianfeng wrote:
Make use of bool as return valuses.


-static inline int cpu_has_vmx_tpr_shadow(void)
+static inline bool cpu_has_vmx_tpr_shadow(void)
  {
-	return vmcs_config.cpu_based_exec_ctrl&  CPU_BASED_TPR_SHADOW;
+	return !!(vmcs_config.cpu_based_exec_ctrl&  CPU_BASED_TPR_SHADOW);
  }


Those !! are not required - demotion to bool is defined to convert nonzero to true.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux