Re: [PATCH 1/2] xen: fix logic bug

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

 



On Wed, Jul 28, 2010 at 05:34:14PM -0600, Eric Blake wrote:
> The recent switch to enable -Wlogical-op paid off again.
> gcc 4.5.0 (rawhide) is smarter than 4.4.4 (Fedora 13).
> 
> * src/xen/xend_internal.c (xenDaemonAttachDeviceFlags)
> (xenDaemonUpdateDeviceFlags, xenDaemonDetachDeviceFlags): Use
> correct operator.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  src/xen/xend_internal.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
> index fad5ce8..311775a 100644
> --- a/src/xen/xend_internal.c
> +++ b/src/xen/xend_internal.c
> @@ -3888,7 +3888,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr domain, const char *xml,
>      } else {
>          /* Only live config can be changed if xendConfigVersion < 3 */
>          if (priv->xendConfigVersion < 3 &&
> -            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT ||
> +            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT &&
>               flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) {
>              virXendError(VIR_ERR_OPERATION_INVALID, "%s",
>                           _("Xend version does not support modifying "
> @@ -4027,7 +4027,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr domain, const char *xml,
>      } else {
>          /* Only live config can be changed if xendConfigVersion < 3 */
>          if (priv->xendConfigVersion < 3 &&
> -            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT ||
> +            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT &&
>               flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) {
>              virXendError(VIR_ERR_OPERATION_INVALID, "%s",
>                           _("Xend version does not support modifying "
> @@ -4138,7 +4138,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr domain, const char *xml,
>      } else {
>          /* Only live config can be changed if xendConfigVersion < 3 */
>          if (priv->xendConfigVersion < 3 &&
> -            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT ||
> +            (flags != VIR_DOMAIN_DEVICE_MODIFY_CURRENT &&
>               flags != VIR_DOMAIN_DEVICE_MODIFY_LIVE)) {
>              virXendError(VIR_ERR_OPERATION_INVALID, "%s",
>                           _("Xend version does not support modifying "

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]