From 2d8c7625ffabe334c66c032cb5a3593754445063 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 8 Jul 2013 15:09:33 +0100 Subject: [PATCH] Convert 'int i' to 'size_t i' in src/uml/ files 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 --- src/uml/uml_conf.c | 6 +++--- src/uml/uml_driver.c | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c index e9d3ddb3ec..18cff50569 100644 --- a/src/uml/uml_conf.c +++ b/src/uml/uml_conf.c @@ -384,7 +384,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn, struct uml_driver *driver, virDomainObjPtr vm) { - int i, j; + size_t i, j; virCommandPtr cmd; cmd = virCommandNew(vm->def->os.kernel); @@ -428,7 +428,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn, if (chr) ret = umlBuildCommandLineChr(chr, "con", cmd); if (!ret) - if (virAsprintf(&ret, "con%d=none", i) < 0) + if (virAsprintf(&ret, "con%zu=none", i) < 0) goto error; virCommandAddArg(cmd, ret); VIR_FREE(ret); @@ -443,7 +443,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn, if (chr) ret = umlBuildCommandLineChr(chr, "ssl", cmd); if (!ret) - if (virAsprintf(&ret, "ssl%d=none", i) < 0) + if (virAsprintf(&ret, "ssl%zu=none", i) < 0) goto error; virCommandAddArg(cmd, ret); diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index eea68db102..7abcd6bb00 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -273,7 +273,7 @@ static int umlIdentifyChrPTY(struct uml_driver *driver, virDomainObjPtr dom) { - int i; + size_t i; for (i = 0; i < dom->def->nconsoles; i++) if (dom->def->consoles[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY) @@ -995,7 +995,7 @@ error: static void umlCleanupTapDevices(virDomainObjPtr vm) { - int i; + size_t i; for (i = 0; i < vm->def->nnets; i++) { virDomainNetDefPtr def = vm->def->nets[i]; @@ -2115,7 +2115,7 @@ static int umlDomainAttachUmlDisk(struct uml_driver *driver, virDomainObjPtr vm, virDomainDiskDefPtr disk) { - int i; + size_t i; char *cmd = NULL; char *reply = NULL; @@ -2239,7 +2239,8 @@ static int umlDomainDetachUmlDisk(struct uml_driver *driver, virDomainObjPtr vm, virDomainDeviceDefPtr dev) { - int i, ret = -1; + size_t i; + int ret = -1; virDomainDiskDefPtr detach = NULL; char *cmd; char *reply; -- 2.47.2