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

[libvirt] [PATCH 04/17] vircgroup: Introduce standard set of typedefs and use them



Signed-off-by: Pavel Hrdina <phrdina redhat com>
---
 src/util/vircgroup.c     | 2 +-
 src/util/vircgroup.h     | 3 ++-
 src/util/vircgrouppriv.h | 4 +++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 7602641713..5144b33d43 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -385,7 +385,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
             const char *typestr = virCgroupControllerTypeToString(i);
             int typelen = strlen(typestr);
             char *tmp = entry.mnt_opts;
-            struct _virCgroupController *controller = &group->controllers[i];
+            virCgroupControllerPtr controller = &group->controllers[i];
             while (tmp) {
                 char *next = strchr(tmp, ',');
                 int len;
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index cfa69b67cb..af93316197 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -29,7 +29,8 @@
 # include "virbitmap.h"
 
 struct _virCgroup;
-typedef struct _virCgroup *virCgroupPtr;
+typedef struct _virCgroup virCgroup;
+typedef virCgroup *virCgroupPtr;
 
 enum {
     VIR_CGROUP_CONTROLLER_CPU,
diff --git a/src/util/vircgrouppriv.h b/src/util/vircgrouppriv.h
index 71788639d6..1b47d3b858 100644
--- a/src/util/vircgrouppriv.h
+++ b/src/util/vircgrouppriv.h
@@ -41,11 +41,13 @@ struct _virCgroupController {
     char *linkPoint;
     char *placement;
 };
+typedef struct _virCgroupController virCgroupController;
+typedef virCgroupController *virCgroupControllerPtr;
 
 struct _virCgroup {
     char *path;
 
-    struct _virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
+    virCgroupController controllers[VIR_CGROUP_CONTROLLER_LAST];
 };
 
 int virCgroupDetectMountsFromFile(virCgroupPtr group,
-- 
2.17.1


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