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