mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
syntax: prefer space after semicolon in for loop
I noticed several unusual spacings in for loops, and decided to fix them up. See the next commit for the syntax check that found all of these. * examples/domsuspend/suspend.c (main): Fix spacing. * python/libvirt-override.c: Likewise. * src/conf/interface_conf.c: Likewise. * src/security/virt-aa-helper.c: Likewise. * src/util/virconf.c: Likewise. * src/util/virhook.c: Likewise. * src/util/virlog.c: Likewise. * src/util/virsocketaddr.c: Likewise. * src/util/virsysinfo.c: Likewise. * src/util/viruuid.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop default case, to let compiler check us. * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
2da3bc646e
commit
146ba114a5
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* interface_conf.c: interfaces XML handling
|
||||
*
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2010, 2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* virconf.c: parser for a subset of the Python encoded Xen configuration files
|
||||
*
|
||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* viruuid.h: helper APIs for dealing with UUIDs
|
||||
*
|
||||
* Copyright (C) 2007-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2007-2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -2938,7 +2938,7 @@ sharedFoldersCleanup:
|
||||
}
|
||||
|
||||
/* Now get the details about the network cards here */
|
||||
for (i = 0;(netAdpIncCnt < def->nnets) && (i < netAdpCnt); i++) {
|
||||
for (i = 0; netAdpIncCnt < def->nnets && i < netAdpCnt; i++) {
|
||||
INetworkAdapter *adapter = NULL;
|
||||
|
||||
machine->vtbl->GetNetworkAdapter(machine, i, &adapter);
|
||||
@ -3216,7 +3216,9 @@ sharedFoldersCleanup:
|
||||
}
|
||||
|
||||
/* Now get the details about the serial ports here */
|
||||
for (i = 0;(serialPortIncCount < def->nserials) && (i < serialPortCount); i++) {
|
||||
for (i = 0;
|
||||
serialPortIncCount < def->nserials && i < serialPortCount;
|
||||
i++) {
|
||||
ISerialPort *serialPort = NULL;
|
||||
|
||||
machine->vtbl->GetSerialPort(machine, i, &serialPort);
|
||||
@ -3300,7 +3302,10 @@ sharedFoldersCleanup:
|
||||
}
|
||||
|
||||
/* Now get the details about the parallel ports here */
|
||||
for (i = 0;(parallelPortIncCount < def->nparallels) && (i < parallelPortCount); i++) {
|
||||
for (i = 0;
|
||||
parallelPortIncCount < def->nparallels &&
|
||||
i < parallelPortCount;
|
||||
i++) {
|
||||
IParallelPort *parallelPort = NULL;
|
||||
|
||||
machine->vtbl->GetParallelPort(machine, i, ¶llelPort);
|
||||
|
@ -2873,7 +2873,8 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn,
|
||||
memset(&op_sys, 0, sizeof(op_sys));
|
||||
op_sys.cmd = XEN_V2_OP_GETAVAILHEAP;
|
||||
|
||||
for (i = startCell, j = 0;(i < priv->nbNodeCells) && (j < maxCells);i++,j++) {
|
||||
for (i = startCell, j = 0;
|
||||
i < priv->nbNodeCells && j < maxCells; i++, j++) {
|
||||
if (hv_versions.sys_interface >= 5)
|
||||
op_sys.u.availheap5.node = i;
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* virsh-domain-monitor.c: Commands to monitor domain status
|
||||
*
|
||||
* Copyright (C) 2005, 2007-2012 Red Hat, Inc.
|
||||
* Copyright (C) 2005, 2007-2013 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -156,8 +156,8 @@ vshDomainStateToString(int state)
|
||||
case VIR_DOMAIN_PMSUSPENDED:
|
||||
return N_("pmsuspended");
|
||||
case VIR_DOMAIN_NOSTATE:
|
||||
default:
|
||||
;/*FALLTHROUGH*/
|
||||
case VIR_DOMAIN_LAST:
|
||||
break;
|
||||
}
|
||||
return N_("no state"); /* = dom0 state */
|
||||
}
|
||||
|
@ -114,15 +114,15 @@ vshCommandOptDomainBy(vshControl *ctl, const vshCmd *cmd,
|
||||
static const char *
|
||||
vshDomainVcpuStateToString(int state)
|
||||
{
|
||||
switch (state) {
|
||||
switch ((virVcpuState) state) {
|
||||
case VIR_VCPU_OFFLINE:
|
||||
return N_("offline");
|
||||
case VIR_VCPU_BLOCKED:
|
||||
return N_("idle");
|
||||
case VIR_VCPU_RUNNING:
|
||||
return N_("running");
|
||||
default:
|
||||
;/*FALLTHROUGH*/
|
||||
case VIR_VCPU_LAST:
|
||||
break;
|
||||
}
|
||||
return N_("no state");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user