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