On 07/08/2013 10:21 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Convert the type of loop iterators named 'i', 'j', k',
'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or
'unsigned int', also santizing 'ii', 'jj', 'kk' to use
the normal 'i', 'j', 'k' naming
Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
src/qemu/qemu_agent.c | 9 ++--
src/qemu/qemu_capabilities.c | 7 +--
src/qemu/qemu_cgroup.c | 12 ++---
src/qemu/qemu_command.c | 104 +++++++++++++++++++------------------
src/qemu/qemu_conf.c | 2 +-
src/qemu/qemu_domain.c | 34 ++++++------
src/qemu/qemu_driver.c | 120 +++++++++++++++++++++++--------------------
src/qemu/qemu_hostdev.c | 26 +++++-----
src/qemu/qemu_hotplug.c | 54 ++++++++++---------
src/qemu/qemu_migration.c | 25 ++++-----
src/qemu/qemu_monitor.c | 13 ++---
src/qemu/qemu_monitor_json.c | 31 ++++++-----
src/qemu/qemu_monitor_text.c | 6 +--
src/qemu/qemu_process.c | 48 ++++++++---------
14 files changed, 259 insertions(+), 232 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1b9ba41..44f880d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12227,9 +12232,10 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
ret = qemuMonitorTransaction(priv->mon, actions);
virJSONValueFree(actions);
if (ret < 0) {
+ int idx = i;
here I think ssize idx is better
/* Transaction failed; undo the changes to vm. */
bool need_unlink = !(flags & VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT);
- while (--i >= 0) {
+ while (--idx >= 0) {
virDomainDiskDefPtr persistDisk = NULL;
if (snap->def->disks[i].snapshot ==
@@ -12247,6 +12253,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
snap->def->dom->disks[i],
vm->def->disks[i],
persistDisk,
+
useless blank line here.
need_unlink);
}
}
ACK
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list