mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
src/locking: Remove the whitespace before ";"
This commit is contained in:
parent
ea4e554038
commit
45ca0b8785
@ -138,12 +138,12 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
|
||||
|
||||
if (withResources) {
|
||||
VIR_DEBUG("Adding leases");
|
||||
for (i = 0 ; i < dom->def->nleases ; i++)
|
||||
for (i = 0; i < dom->def->nleases; i++)
|
||||
if (virDomainLockManagerAddLease(lock, dom->def->leases[i]) < 0)
|
||||
goto error;
|
||||
|
||||
VIR_DEBUG("Adding disks");
|
||||
for (i = 0 ; i < dom->def->ndisks ; i++)
|
||||
for (i = 0; i < dom->def->ndisks; i++)
|
||||
if (virDomainLockManagerAddDisk(lock, dom->def->disks[i]) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < n ; i++) {
|
||||
for (i = 0; i < n; i++) {
|
||||
virLockSpacePtr lockspace;
|
||||
|
||||
child = virJSONValueArrayGet(lockspaces, i);
|
||||
@ -749,7 +749,7 @@ virLockDaemonClientFree(void *opaque)
|
||||
* closed the connection, we must kill it off
|
||||
* to make sure it doesn't do nasty stuff */
|
||||
if (data.gotError || data.hadSomeLeases) {
|
||||
for (i = 0 ; i < 15 ; i++) {
|
||||
for (i = 0; i < 15; i++) {
|
||||
int signum;
|
||||
if (i == 0)
|
||||
signum = SIGTERM;
|
||||
|
@ -428,7 +428,7 @@ static void virLockManagerLockDaemonFree(virLockManagerPtr lock)
|
||||
|
||||
lock->privateData = NULL;
|
||||
|
||||
for (i = 0 ; i < priv->nresources ; i++) {
|
||||
for (i = 0; i < priv->nresources; i++) {
|
||||
VIR_FREE(priv->resources[i].lockspace);
|
||||
VIR_FREE(priv->resources[i].name);
|
||||
}
|
||||
@ -459,7 +459,7 @@ static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
|
||||
|
||||
switch (type) {
|
||||
case VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN:
|
||||
for (i = 0 ; i < nparams ; i++) {
|
||||
for (i = 0; i < nparams; i++) {
|
||||
if (STREQ(params[i].key, "uuid")) {
|
||||
memcpy(priv->uuid, params[i].value.uuid, VIR_UUID_BUFLEN);
|
||||
} else if (STREQ(params[i].key, "name")) {
|
||||
@ -530,7 +530,7 @@ static char *virLockManagerLockDaemonDiskLeaseName(const char *path)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < SHA256_DIGEST_SIZE ; i++) {
|
||||
for (i = 0; i < SHA256_DIGEST_SIZE; i++) {
|
||||
ret[i*2] = hex[(buf[i] >> 4) & 0xf];
|
||||
ret[(i*2)+1] = hex[buf[i] & 0xf];
|
||||
}
|
||||
@ -629,7 +629,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
|
||||
size_t i;
|
||||
char *path = NULL;
|
||||
char *lockspace = NULL;
|
||||
for (i = 0 ; i < nparams ; i++) {
|
||||
for (i = 0; i < nparams; i++) {
|
||||
if (STREQ(params[i].key, "offset")) {
|
||||
if (params[i].value.ul != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
@ -725,7 +725,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
|
||||
|
||||
if (!(flags & VIR_LOCK_MANAGER_ACQUIRE_REGISTER_ONLY)) {
|
||||
size_t i;
|
||||
for (i = 0 ; i < priv->nresources ; i++) {
|
||||
for (i = 0; i < priv->nresources; i++) {
|
||||
virLockSpaceProtocolAcquireResourceArgs args;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
@ -781,7 +781,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
|
||||
if (!(client = virLockManagerLockDaemonConnect(lock, &program, &counter)))
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0 ; i < priv->nresources ; i++) {
|
||||
for (i = 0; i < priv->nresources; i++) {
|
||||
virLockSpaceProtocolReleaseResourceArgs args;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
|
@ -540,7 +540,7 @@ static int virLockManagerSanlockDiskLeaseName(const char *path,
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < MD5_DIGEST_SIZE ; i++) {
|
||||
for (i = 0; i < MD5_DIGEST_SIZE; i++) {
|
||||
str[i*2] = hex[(buf[i] >> 4) & 0xf];
|
||||
str[(i*2)+1] = hex[buf[i] & 0xf];
|
||||
}
|
||||
@ -1020,7 +1020,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
|
||||
VIR_DEBUG("Acquire completed fd=%d", sock);
|
||||
|
||||
if (res_free) {
|
||||
for (i = 0 ; i < res_count ; i++) {
|
||||
for (i = 0; i < res_count; i++) {
|
||||
VIR_FREE(res_args[i]);
|
||||
}
|
||||
VIR_FREE(res_args);
|
||||
@ -1033,7 +1033,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
|
||||
|
||||
error:
|
||||
if (res_free) {
|
||||
for (i = 0 ; i < res_count ; i++) {
|
||||
for (i = 0; i < res_count; i++) {
|
||||
VIR_FREE(res_args[i]);
|
||||
}
|
||||
VIR_FREE(res_args);
|
||||
|
@ -79,7 +79,7 @@ static void virLockManagerLogParams(size_t nparams,
|
||||
{
|
||||
int i;
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
for (i = 0 ; i < nparams ; i++) {
|
||||
for (i = 0; i < nparams; i++) {
|
||||
switch (params[i].type) {
|
||||
case VIR_LOCK_MANAGER_PARAM_TYPE_INT:
|
||||
VIR_DEBUG(" key=%s type=int value=%d", params[i].key, params[i].value.i);
|
||||
|
Loading…
Reference in New Issue
Block a user