mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
sheepdog: Omit braces with a single-line body
libvirt/HACKING suggests omitting braces with a single-line body; this patch fixes the coding style problem for the Sheepdog storage backend driver. Signed-off-by: Harry Wei <harryxiyou@gmail.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
aed4986322
commit
0f35e00135
@ -97,12 +97,10 @@ virStorageBackendSheepdogAddHostArg(virCommandPtr cmd,
|
|||||||
const char *address = "localhost";
|
const char *address = "localhost";
|
||||||
int port = 7000;
|
int port = 7000;
|
||||||
if (pool->def->source.nhost > 0) {
|
if (pool->def->source.nhost > 0) {
|
||||||
if (pool->def->source.hosts[0].name != NULL) {
|
if (pool->def->source.hosts[0].name != NULL)
|
||||||
address = pool->def->source.hosts[0].name;
|
address = pool->def->source.hosts[0].name;
|
||||||
}
|
if (pool->def->source.hosts[0].port)
|
||||||
if (pool->def->source.hosts[0].port) {
|
|
||||||
port = pool->def->source.hosts[0].port;
|
port = pool->def->source.hosts[0].port;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
virCommandAddArg(cmd, "-a");
|
virCommandAddArg(cmd, "-a");
|
||||||
virCommandAddArgFormat(cmd, "%s", address);
|
virCommandAddArgFormat(cmd, "%s", address);
|
||||||
@ -210,11 +208,10 @@ virStorageBackendSheepdogParseVdiList(virStorageVolDefPtr vol,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* skip space */
|
/* skip space */
|
||||||
if (p + 2 < next) {
|
if (p + 2 < next)
|
||||||
p += 2;
|
p += 2;
|
||||||
} else {
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
/* skip name */
|
/* skip name */
|
||||||
while (*p != '\0' && *p != ' ') {
|
while (*p != '\0' && *p != ' ') {
|
||||||
|
Loading…
Reference in New Issue
Block a user