From: Michal Privoznik <mpriv...@redhat.com>

The virNetDevVPortProfile enum is both explicitly declared and
also typedef-ed. This repetition is redundant. Just use typedef.
To make matters worse, there's another type with the same name,
but because in the code, those few places used 'enum
virNetDevVPortProfile var;' to declare variables compilers didn't
complain.

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 src/conf/netdev_vport_profile_conf.c | 2 +-
 src/util/virnetdevvportprofile.c     | 2 +-
 src/util/virnetdevvportprofile.h     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/netdev_vport_profile_conf.c 
b/src/conf/netdev_vport_profile_conf.c
index 523d9b642c..f7928a5679 100644
--- a/src/conf/netdev_vport_profile_conf.c
+++ b/src/conf/netdev_vport_profile_conf.c
@@ -169,7 +169,7 @@ void
 virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort,
                             virBuffer *buf)
 {
-    enum virNetDevVPortProfile type;
+    virNetDevVPortProfileType type;
     bool noParameters;
 
     if (!virtPort)
diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
index c755fa79ec..221e0888b3 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -279,7 +279,7 @@ static int
 virNetDevVPortProfileMerge(virNetDevVPortProfile *orig,
                            const virNetDevVPortProfile *mods)
 {
-    enum virNetDevVPortProfile otype;
+    virNetDevVPortProfileType otype;
 
     if (!orig || !mods)
         return 0;
diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprofile.h
index 600b2093c5..43ccb891e7 100644
--- a/src/util/virnetdevvportprofile.h
+++ b/src/util/virnetdevvportprofile.h
@@ -25,7 +25,7 @@
 
 #define LIBVIRT_IFLA_VF_PORT_PROFILE_MAX 40
 
-typedef enum virNetDevVPortProfile {
+typedef enum {
     VIR_NETDEV_VPORT_PROFILE_NONE,
     VIR_NETDEV_VPORT_PROFILE_8021QBG,
     VIR_NETDEV_VPORT_PROFILE_8021QBH,
-- 
2.49.1

Reply via email to