[libvirt] [PATCH 4/5] src/xenconfig: remove dead code
Eric Blake
eblake at redhat.com
Mon Aug 18 16:03:53 UTC 2014
On 08/15/2014 09:50 PM, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
> src/xenconfig/xen_xm.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c
> index 0402213..83cc8c6 100644
> --- a/src/xenconfig/xen_xm.c
> +++ b/src/xenconfig/xen_xm.c
> @@ -29,7 +29,6 @@
> #include "virerror.h"
> #include "virconf.h"
> #include "viralloc.h"
> -#include "verify.h"
> #include "viruuid.h"
> #include "virsexpr.h"
> #include "count-one-bits.h"
> @@ -2414,10 +2413,6 @@ xenFormatConfigCommon(virConfPtr conf,
> }
>
>
> -/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
> - either 32, or 64 on a platform where long is big enough. */
> -verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
Umm, why are you declaring this to be dead code? I still see in
src/xenconfig/xen_xm.c the following:
xenParseXMCPUFeatures(virConfPtr conf, virDomainDefPtr def)
...
if (xenXMConfigGetULong(conf, "vcpus", &count, 1) < 0 ||
MAX_VIRT_CPUS < count)
return -1;
...
xenFormatXMCPUAllocation(virConfPtr conf, virDomainDefPtr def)
...
/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
either 32, or 64 on a platform where long is big enough. */
if (def->vcpus < def->maxvcpus &&
xenXMConfigSetInt(conf, "vcpu_avail", (1UL << def->vcpus) - 1) < 0)
which sounds to me like the verify is still required code.
NACK unless you can offer better justification.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140818/606af9c5/attachment-0001.sig>
More information about the libvir-list
mailing list