c480ed
From aeec7565df4f246c937f494c99a8d2d1ff03168d Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <aeec7565df4f246c937f494c99a8d2d1ff03168d@dist-git>
c480ed
From: Pavel Hrdina <phrdina@redhat.com>
c480ed
Date: Mon, 1 Jul 2019 17:05:49 +0200
c480ed
Subject: [PATCH] vircgroup: Introduce standard set of typedefs and use them
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
c480ed
(cherry picked from commit cd77242504c8f3ba8d4ff7d1a7d4234f0aa5ede3)
c480ed
c480ed
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
c480ed
c480ed
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
c480ed
Message-Id: <7e482b4826c05db78d1136bfa6091ab5d3097f47.1561993099.git.phrdina@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/util/vircgroup.c     | 2 +-
c480ed
 src/util/vircgroup.h     | 3 ++-
c480ed
 src/util/vircgrouppriv.h | 4 +++-
c480ed
 3 files changed, 6 insertions(+), 3 deletions(-)
c480ed
c480ed
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
c480ed
index 7602641713..5144b33d43 100644
c480ed
--- a/src/util/vircgroup.c
c480ed
+++ b/src/util/vircgroup.c
c480ed
@@ -385,7 +385,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
c480ed
             const char *typestr = virCgroupControllerTypeToString(i);
c480ed
             int typelen = strlen(typestr);
c480ed
             char *tmp = entry.mnt_opts;
c480ed
-            struct _virCgroupController *controller = &group->controllers[i];
c480ed
+            virCgroupControllerPtr controller = &group->controllers[i];
c480ed
             while (tmp) {
c480ed
                 char *next = strchr(tmp, ',');
c480ed
                 int len;
c480ed
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
c480ed
index cfa69b67cb..af93316197 100644
c480ed
--- a/src/util/vircgroup.h
c480ed
+++ b/src/util/vircgroup.h
c480ed
@@ -29,7 +29,8 @@
c480ed
 # include "virbitmap.h"
c480ed
 
c480ed
 struct _virCgroup;
c480ed
-typedef struct _virCgroup *virCgroupPtr;
c480ed
+typedef struct _virCgroup virCgroup;
c480ed
+typedef virCgroup *virCgroupPtr;
c480ed
 
c480ed
 enum {
c480ed
     VIR_CGROUP_CONTROLLER_CPU,
c480ed
diff --git a/src/util/vircgrouppriv.h b/src/util/vircgrouppriv.h
c480ed
index 71788639d6..1b47d3b858 100644
c480ed
--- a/src/util/vircgrouppriv.h
c480ed
+++ b/src/util/vircgrouppriv.h
c480ed
@@ -41,11 +41,13 @@ struct _virCgroupController {
c480ed
     char *linkPoint;
c480ed
     char *placement;
c480ed
 };
c480ed
+typedef struct _virCgroupController virCgroupController;
c480ed
+typedef virCgroupController *virCgroupControllerPtr;
c480ed
 
c480ed
 struct _virCgroup {
c480ed
     char *path;
c480ed
 
c480ed
-    struct _virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
c480ed
+    virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
c480ed
 };
c480ed
 
c480ed
 int virCgroupDetectMountsFromFile(virCgroupPtr group,
c480ed
-- 
c480ed
2.22.0
c480ed