Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-28 Thread Markus Groß
Am Mittwoch 23 März 2011 17:59:11 schrieb Jim Fehlig: Markus Groß wrote: +maplen = (unsigned int) ceil((double) nvcpus / 8); +if (VIR_ALLOC_N(bitmask, maplen) 0) { +virReportOOMError(); +goto cleanup; +} + +memset(bitmask, 0, maplen); +for (i =

Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-28 Thread Jim Fehlig
Markus Groß wrote: Am Mittwoch 23 März 2011 17:59:11 schrieb Jim Fehlig: Markus Groß wrote: +maplen = (unsigned int) ceil((double) nvcpus / 8); +if (VIR_ALLOC_N(bitmask, maplen) 0) { +virReportOOMError(); +goto cleanup; +} + +memset(bitmask, 0,

Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-23 Thread Jim Fehlig
Markus Groß wrote: --- src/libxl/libxl_driver.c | 295 +- 1 files changed, 290 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 7ee3930..49fc90f 100644 --- a/src/libxl/libxl_driver.c +++

Re: [libvirt] [PATCH 3/8] Add vcpu functions to libxl driver

2011-03-23 Thread Eric Blake
On 03/23/2011 10:59 AM, Jim Fehlig wrote: +unsigned int i = 0; I thought I recalled variable declaration only at start of a block but don't see anything about it in HACKING. Perhaps someone else can clarify. We require C99 for other reasons, but where it is easy to do, yes, we still