[libvirt] [PATCH 6/7] virsh: use logical or for boolean values

Ján Tomko jtomko at redhat.com
Tue Mar 6 14:01:38 UTC 2018


Bitwise or just looks wrong here.
Introduced by <commit 69e0cd3>.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 29bc8e6db..c78cf7f21 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -7213,7 +7213,7 @@ cmdGuestvcpus(vshControl *ctl, const vshCmd *cmd)
     if (vshCommandOptStringReq(ctl, cmd, "cpulist", &cpulist))
         return false;
 
-    if (cpulist && !(enable | disable)) {
+    if (cpulist && !(enable || disable)) {
         vshError(ctl, _("One of options --enable or --disable is required by "
                         "option --cpulist"));
         return false;
-- 
2.16.1




More information about the libvir-list mailing list