qemuDomainBlockRebase: Replace ternary operator with if/else

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-09-22 11:07:39 +02:00
parent 18cc8bb3f6
commit 2b150c4d5f
1 changed files with 4 additions and 2 deletions

View File

@ -15301,8 +15301,10 @@ qemuDomainBlockRebase(virDomainPtr dom, const char *path, const char *base,
/* If we got here, we are doing a block copy rebase. */
dest = virStorageSourceNew();
dest->type = (flags & VIR_DOMAIN_BLOCK_REBASE_COPY_DEV) ?
VIR_STORAGE_TYPE_BLOCK : VIR_STORAGE_TYPE_FILE;
if (flags & VIR_DOMAIN_BLOCK_REBASE_COPY_DEV)
dest->type = VIR_STORAGE_TYPE_BLOCK;
else
dest->type = VIR_STORAGE_TYPE_FILE;
dest->path = g_strdup(base);
if (flags & VIR_DOMAIN_BLOCK_REBASE_COPY_RAW)
dest->format = VIR_STORAGE_FILE_RAW;