mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 01:04:59 +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,
|
struct uml_driver *driver,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
int i, j;
|
size_t i, j;
|
||||||
virCommandPtr cmd;
|
virCommandPtr cmd;
|
||||||
|
|
||||||
cmd = virCommandNew(vm->def->os.kernel);
|
cmd = virCommandNew(vm->def->os.kernel);
|
||||||
@ -428,7 +428,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn,
|
|||||||
if (chr)
|
if (chr)
|
||||||
ret = umlBuildCommandLineChr(chr, "con", cmd);
|
ret = umlBuildCommandLineChr(chr, "con", cmd);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
if (virAsprintf(&ret, "con%d=none", i) < 0)
|
if (virAsprintf(&ret, "con%zu=none", i) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
virCommandAddArg(cmd, ret);
|
virCommandAddArg(cmd, ret);
|
||||||
VIR_FREE(ret);
|
VIR_FREE(ret);
|
||||||
@ -443,7 +443,7 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn,
|
|||||||
if (chr)
|
if (chr)
|
||||||
ret = umlBuildCommandLineChr(chr, "ssl", cmd);
|
ret = umlBuildCommandLineChr(chr, "ssl", cmd);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
if (virAsprintf(&ret, "ssl%d=none", i) < 0)
|
if (virAsprintf(&ret, "ssl%zu=none", i) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
virCommandAddArg(cmd, ret);
|
virCommandAddArg(cmd, ret);
|
||||||
|
@ -273,7 +273,7 @@ static int
|
|||||||
umlIdentifyChrPTY(struct uml_driver *driver,
|
umlIdentifyChrPTY(struct uml_driver *driver,
|
||||||
virDomainObjPtr dom)
|
virDomainObjPtr dom)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < dom->def->nconsoles; i++)
|
for (i = 0; i < dom->def->nconsoles; i++)
|
||||||
if (dom->def->consoles[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY)
|
if (dom->def->consoles[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY)
|
||||||
@ -995,7 +995,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
static void umlCleanupTapDevices(virDomainObjPtr vm) {
|
static void umlCleanupTapDevices(virDomainObjPtr vm) {
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < vm->def->nnets; i++) {
|
for (i = 0; i < vm->def->nnets; i++) {
|
||||||
virDomainNetDefPtr def = vm->def->nets[i];
|
virDomainNetDefPtr def = vm->def->nets[i];
|
||||||
@ -2115,7 +2115,7 @@ static int umlDomainAttachUmlDisk(struct uml_driver *driver,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDiskDefPtr disk)
|
virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
char *cmd = NULL;
|
char *cmd = NULL;
|
||||||
char *reply = NULL;
|
char *reply = NULL;
|
||||||
|
|
||||||
@ -2239,7 +2239,8 @@ static int umlDomainDetachUmlDisk(struct uml_driver *driver,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDeviceDefPtr dev)
|
virDomainDeviceDefPtr dev)
|
||||||
{
|
{
|
||||||
int i, ret = -1;
|
size_t i;
|
||||||
|
int ret = -1;
|
||||||
virDomainDiskDefPtr detach = NULL;
|
virDomainDiskDefPtr detach = NULL;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
char *reply;
|
char *reply;
|
||||||
|
Loading…
Reference in New Issue
Block a user