[PATCH 04/20] qemu: Drop needless typecast to virDomainFSDriverType

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_command.c        | 4 ++--
 src/qemu/qemu_domain_address.c | 2 +-
 src/qemu/qemu_validate.c       | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e84374b4cf..f9e4de9bd7 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -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:
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index e5f0a9e883..01f44a4991 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -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:
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 5bae56b00f..c7deac6251 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -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;
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux