Convert 'int i' to 'size_t i' in src/security 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:
Daniel P. Berrange 2013-07-08 15:09:33 +01:00
parent 71c7fcdb35
commit 716961372e
5 changed files with 10 additions and 9 deletions

View File

@ -834,7 +834,7 @@ virSecurityDACRestoreSecurityAllLabel(virSecurityManagerPtr mgr,
int migrated)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
int i;
size_t i;
int rc = 0;
if (!priv->dynamicOwnership)
@ -904,7 +904,7 @@ virSecurityDACSetSecurityAllLabel(virSecurityManagerPtr mgr,
const char *stdin_path ATTRIBUTE_UNUSED)
{
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
int i;
size_t i;
uid_t user;
gid_t group;

View File

@ -53,7 +53,7 @@ virSecurityDriverPtr virSecurityDriverLookup(const char *name,
const char *virtDriver)
{
virSecurityDriverPtr drv = NULL;
int i;
size_t i;
VIR_DEBUG("name=%s", NULLSTR(name));

View File

@ -1826,7 +1826,7 @@ virSecuritySELinuxRestoreSecurityAllLabel(virSecurityManagerPtr mgr,
{
virSecurityLabelDefPtr secdef;
virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr);
int i;
size_t i;
int rc = 0;
VIR_DEBUG("Restoring security label on %s", def->name);
@ -2227,7 +2227,7 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
const char *stdin_path)
{
int i;
size_t i;
virSecuritySELinuxDataPtr data = virSecurityManagerGetPrivateData(mgr);
virSecurityLabelDefPtr secdef;

View File

@ -513,7 +513,8 @@ virSecurityStackGetNested(virSecurityManagerPtr mgr)
virSecurityManagerPtr *list = NULL;
virSecurityStackDataPtr priv = virSecurityManagerGetPrivateData(mgr);
virSecurityStackItemPtr item;
int len = 0, i = 0;
int len = 0;
size_t i;
for (item = priv->itemsHead; item; item = item->next)
len++;
@ -521,7 +522,7 @@ virSecurityStackGetNested(virSecurityManagerPtr mgr)
if (VIR_ALLOC_N(list, len + 1) < 0)
return NULL;
for (item = priv->itemsHead; item; item = item->next, i++)
for (i = 0, item = priv->itemsHead; item; item = item->next, i++)
list[i] = item->securityManager;
list[len] = NULL;

View File

@ -498,7 +498,7 @@ valid_name(const char *name)
static int
array_starts_with(const char *str, const char * const *arr, const long size)
{
int i;
size_t i;
for (i = 0; i < size; i++) {
if (strlen(str) < strlen(arr[i]))
continue;
@ -890,7 +890,7 @@ get_files(vahControl * ctl)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
int rc = -1;
int i;
size_t i;
char *uuid;
char uuidstr[VIR_UUID_STRING_BUFLEN];