[PATCH v2 02/41] util: buffer: typedef for struct _virBufferEscapePair

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

 



Create and use typedefs virBufferEscapePair and virBufferEscapePairPtr
for struct _virBufferEscapePair for cleaner code and for use with
cleanup macros.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@xxxxxxxxx>
---
 src/util/virbuffer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c
index 3d6defb..ea96704 100644
--- a/src/util/virbuffer.c
+++ b/src/util/virbuffer.c
@@ -648,12 +648,14 @@ virBufferEscape(virBufferPtr buf, char escape, const char *toescape,
 }
 
 
+typedef struct _virBufferEscapePair virBufferEscapePair;
+typedef virBufferEscapePair *virBufferEscapePairPtr;
+
 struct _virBufferEscapePair {
     char escape;
     char *toescape;
 };
 
-
 /**
  * virBufferEscapeN:
  * @buf: the buffer to append to
@@ -678,8 +680,8 @@ virBufferEscapeN(virBufferPtr buf,
     char *escaped = NULL;
     char *out;
     const char *cur;
-    struct _virBufferEscapePair escapeItem;
-    struct _virBufferEscapePair *escapeList = NULL;
+    virBufferEscapePair escapeItem;
+    virBufferEscapePairPtr escapeList = NULL;
     size_t nescapeList = 0;
     va_list ap;
 
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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