mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
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 <berrange@redhat.com>
This commit is contained in:
parent
85bd57388e
commit
2d8c7625ff
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user