diff mbox

[2/6] fix undefined shifts by >32

Message ID 1264600499-3384-3-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Jan. 27, 2010, 1:54 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index 5e8c775..d9f1ccb 100644
--- a/vl.c
+++ b/vl.c
@@ -2373,9 +2373,9 @@  static void numa_add(const char *optarg)
                         fprintf(stderr,
                             "only 63 CPUs in NUMA mode supported.\n");
                     }
-                    value = (1 << (endvalue + 1)) - (1 << value);
+                    value = (2ULL << endvalue) - (1ULL << value);
                 } else {
-                    value = 1 << value;
+                    value = 1ULL << value;
                 }
             }
             node_cpumask[nodenr] = value;