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:
Michal Privoznik 2023-05-02 12:10:30 +02:00
parent 8435be3923
commit 3926f1e688
3 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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;