mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
testOpenDefault: Rename loop variable
We have inclination to calling our loop variables i, j, k, not u. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d4a9b21511
commit
c72690e279
@ -1262,10 +1262,10 @@ testOpenFromFile(virConnectPtr conn, const char *file)
|
|||||||
static int
|
static int
|
||||||
testOpenDefault(virConnectPtr conn)
|
testOpenDefault(virConnectPtr conn)
|
||||||
{
|
{
|
||||||
int u;
|
|
||||||
testDriverPtr privconn = NULL;
|
testDriverPtr privconn = NULL;
|
||||||
xmlDocPtr doc = NULL;
|
xmlDocPtr doc = NULL;
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
virMutexLock(&defaultLock);
|
virMutexLock(&defaultLock);
|
||||||
if (defaultConnections++) {
|
if (defaultConnections++) {
|
||||||
@ -1283,20 +1283,20 @@ testOpenDefault(virConnectPtr conn)
|
|||||||
|
|
||||||
/* Numa setup */
|
/* Numa setup */
|
||||||
privconn->numCells = 2;
|
privconn->numCells = 2;
|
||||||
for (u = 0; u < privconn->numCells; ++u) {
|
for (i = 0; i < privconn->numCells; i++) {
|
||||||
privconn->cells[u].numCpus = 8;
|
privconn->cells[i].numCpus = 8;
|
||||||
privconn->cells[u].mem = (u + 1) * 2048 * 1024;
|
privconn->cells[i].mem = (i + 1) * 2048 * 1024;
|
||||||
privconn->cells[u].freeMem = (u + 1) * 1024 * 1024;
|
privconn->cells[i].freeMem = (i + 1) * 1024 * 1024;
|
||||||
}
|
}
|
||||||
for (u = 0; u < 16; u++) {
|
for (i = 0; i < 16; i++) {
|
||||||
virBitmapPtr siblings = virBitmapNew(16);
|
virBitmapPtr siblings = virBitmapNew(16);
|
||||||
if (!siblings)
|
if (!siblings)
|
||||||
goto error;
|
goto error;
|
||||||
ignore_value(virBitmapSetBit(siblings, u));
|
ignore_value(virBitmapSetBit(siblings, i));
|
||||||
privconn->cells[u / 8].cpus[(u % 8)].id = u;
|
privconn->cells[i / 8].cpus[(i % 8)].id = i;
|
||||||
privconn->cells[u / 8].cpus[(u % 8)].socket_id = u / 8;
|
privconn->cells[i / 8].cpus[(i % 8)].socket_id = i / 8;
|
||||||
privconn->cells[u / 8].cpus[(u % 8)].core_id = u % 8;
|
privconn->cells[i / 8].cpus[(i % 8)].core_id = i % 8;
|
||||||
privconn->cells[u / 8].cpus[(u % 8)].siblings = siblings;
|
privconn->cells[i / 8].cpus[(i % 8)].siblings = siblings;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(privconn->caps = testBuildCapabilities(conn)))
|
if (!(privconn->caps = testBuildCapabilities(conn)))
|
||||||
|
Loading…
Reference in New Issue
Block a user