Obviously unnecessary.
Maybe someone had plans for these long ago?
From 94730ec1d99076cd18b04b950adad7c7a576071f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 3 Sep 2009 17:11:14 +0200
Subject: [PATCH] xen_internal.c: remove two unused local variables
* src/xen_internal.c (xenHypervisorSetSchedulerParameters): Remove
set-but-never-used local variables, cap_set and weight_set.
---
src/xen_internal.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/src/xen_internal.c b/src/xen_internal.c
index ae78f84..30fd8bd 100644
--- a/src/xen_internal.c
+++ b/src/xen_internal.c
@@ -1299,9 +1299,6 @@ xenHypervisorSetSchedulerParameters(virDomainPtr domain,
TODO
return(-1);
case XEN_SCHEDULER_CREDIT: {
- int weight_set = 0;
- int cap_set = 0;
-
memset(&op_dom, 0, sizeof(op_dom));
op_dom.cmd = XEN_V2_OP_SCHEDULER;
op_dom.domain = (domid_t) domain->id;
@@ -1326,7 +1323,6 @@ xenHypervisorSetSchedulerParameters(virDomainPtr domain,
return(-1);
}
op_dom.u.getschedinfo.u.credit.weight = val;
- weight_set = 1;
} else if (STREQ (params[i].field, str_cap) &&
params[i].type == VIR_DOMAIN_SCHED_FIELD_UINT) {
val = params[i].value.ui;
@@ -1336,7 +1332,6 @@ xenHypervisorSetSchedulerParameters(virDomainPtr domain,
return(-1);
}
op_dom.u.getschedinfo.u.credit.cap = val;
- cap_set = 1;
} else {
virXenErrorFunc (domain->conn, VIR_ERR_INVALID_ARG, __FUNCTION__,
"Credit scheduler accepts 'cap' and
'weight' integer parameters",
--
1.6.4.2.395.ge3d52