src/*.[ch]: Remove the whitespace before ";"

This commit is contained in:
Osier Yang 2013-05-21 16:08:42 +08:00
parent 45ca0b8785
commit 63411259bb
3 changed files with 15 additions and 15 deletions

View File

@ -151,7 +151,7 @@ virDomainLxcEnterNamespace(virDomainPtr domain,
if (virProcessSetNamespaces(nfdlist, fdlist) < 0) {
if (oldfdlist && noldfdlist) {
for (i = 0 ; i < *noldfdlist ; i++) {
for (i = 0; i < *noldfdlist; i++) {
VIR_FORCE_CLOSE((*oldfdlist)[i]);
}
VIR_FREE(*oldfdlist);

View File

@ -150,7 +150,7 @@ static int virConnectAuthCallbackDefault(virConnectCredentialPtr cred,
void *cbdata ATTRIBUTE_UNUSED) {
int i;
for (i = 0 ; i < ncred ; i++) {
for (i = 0; i < ncred; i++) {
char buf[1024];
char *bufptr = buf;
size_t len;
@ -820,7 +820,7 @@ int virStateInitialize(bool privileged,
if (virInitialize() < 0)
return -1;
for (i = 0 ; i < virStateDriverTabCount ; i++) {
for (i = 0; i < virStateDriverTabCount; i++) {
if (virStateDriverTab[i]->stateInitialize) {
VIR_DEBUG("Running global init for %s state driver",
virStateDriverTab[i]->name);
@ -846,7 +846,7 @@ int virStateInitialize(bool privileged,
int virStateCleanup(void) {
int i, ret = 0;
for (i = 0 ; i < virStateDriverTabCount ; i++) {
for (i = 0; i < virStateDriverTabCount; i++) {
if (virStateDriverTab[i]->stateCleanup &&
virStateDriverTab[i]->stateCleanup() < 0)
ret = -1;
@ -864,7 +864,7 @@ int virStateCleanup(void) {
int virStateReload(void) {
int i, ret = 0;
for (i = 0 ; i < virStateDriverTabCount ; i++) {
for (i = 0; i < virStateDriverTabCount; i++) {
if (virStateDriverTab[i]->stateReload &&
virStateDriverTab[i]->stateReload() < 0)
ret = -1;
@ -882,7 +882,7 @@ int virStateReload(void) {
int virStateStop(void) {
int i, ret = 0;
for (i = 0 ; i < virStateDriverTabCount ; i++) {
for (i = 0; i < virStateDriverTabCount; i++) {
if (virStateDriverTab[i]->stateStop &&
virStateDriverTab[i]->stateStop())
ret = 1;

View File

@ -1478,9 +1478,9 @@ nodeCapsInitNUMAFake(virCapsPtr caps ATTRIBUTE_UNUSED)
}
id = 0;
for (s = 0 ; s < nodeinfo.sockets ; s++) {
for (c = 0 ; c < nodeinfo.cores ; c++) {
for (t = 0 ; t < nodeinfo.threads ; t++) {
for (s = 0; s < nodeinfo.sockets; s++) {
for (c = 0; c < nodeinfo.cores; c++) {
for (t = 0; t < nodeinfo.threads; t++) {
cpus[id].id = id;
cpus[id].socket_id = s;
cpus[id].core_id = c;
@ -1502,7 +1502,7 @@ nodeCapsInitNUMAFake(virCapsPtr caps ATTRIBUTE_UNUSED)
return 0;
error:
for (; id >= 0 ; id--)
for (; id >= 0; id--)
virBitmapFree(cpus[id].siblings);
VIR_FREE(cpus);
return -1;
@ -1637,7 +1637,7 @@ nodeCapsInitNUMA(virCapsPtr caps)
goto cleanup;
memset(allonesmask, 0xff, mask_n_bytes);
for (n = 0 ; n <= numa_max_node() ; n++) {
for (n = 0; n <= numa_max_node(); n++) {
int i;
/* The first time this returns -1, ENOENT if node doesn't exist... */
if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0) {
@ -1655,14 +1655,14 @@ nodeCapsInitNUMA(virCapsPtr caps)
/* Detect the amount of memory in the numa cell */
memory = nodeGetCellMemory(n);
for (ncpus = 0, i = 0 ; i < max_n_cpus ; i++)
for (ncpus = 0, i = 0; i < max_n_cpus; i++)
if (MASK_CPU_ISSET(mask, i))
ncpus++;
if (VIR_ALLOC_N(cpus, ncpus) < 0)
goto cleanup;
for (ncpus = 0, i = 0 ; i < max_n_cpus ; i++) {
for (ncpus = 0, i = 0; i < max_n_cpus; i++) {
if (MASK_CPU_ISSET(mask, i)) {
if (virNodeCapsFillCPUInfo(i, cpus + ncpus++) < 0) {
topology_failed = true;
@ -1714,7 +1714,7 @@ nodeGetCellsFreeMemory(unsigned long long *freeMems,
if (lastCell > maxCell)
lastCell = maxCell;
for (numCells = 0, n = startCell ; n <= lastCell ; n++) {
for (numCells = 0, n = startCell; n <= lastCell; n++) {
long long mem;
if (numa_node_size64(n, &mem) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@ -1740,7 +1740,7 @@ nodeGetFreeMemory(void)
return nodeGetFreeMemoryFake();
for (n = 0 ; n <= numa_max_node() ; n++) {
for (n = 0; n <= numa_max_node(); n++) {
long long mem;
if (numa_node_size64(n, &mem) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,