mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Drop needless typecast to virDomainFSDriverType
The 'fsdriver' member of _virDomainFSDef is already declared of virDomainFSDriverType type. Hence, there is no need to typecast the variable when passing to switch() statements. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8435be3923
commit
3926f1e688
@ -831,7 +831,7 @@ qemuBuildVirtioDevGetConfigDev(const virDomainDeviceDef *device,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DEVICE_FS:
|
||||
switch ((virDomainFSDriverType) device->data.fs->fsdriver) {
|
||||
switch (device->data.fs->fsdriver) {
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_PATH:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE:
|
||||
@ -2434,7 +2434,7 @@ qemuBuildFilesystemCommandLine(virCommand *cmd,
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < def->nfss; i++) {
|
||||
switch ((virDomainFSDriverType) def->fss[i]->fsdriver) {
|
||||
switch (def->fss[i]->fsdriver) {
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_PATH:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE:
|
||||
|
@ -707,7 +707,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DEVICE_FS:
|
||||
switch ((virDomainFSDriverType) dev->data.fs->fsdriver) {
|
||||
switch (dev->data.fs->fsdriver) {
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_PATH:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE:
|
||||
|
@ -4286,7 +4286,7 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs,
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch ((virDomainFSDriverType) fs->fsdriver) {
|
||||
switch (fs->fsdriver) {
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
|
||||
case VIR_DOMAIN_FS_DRIVER_TYPE_PATH:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user