]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Dynbuf: Improve documentation
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:03 +0000 (11:23 -0700)
InitWithMemory is a better name. Improve the init function descriptions.

open-vm-tools/lib/include/dynbuf.h
open-vm-tools/lib/misc/dynbuf.c

index 19ca5ad57fb0876ad7150441e49e471e3a2fea99..eb4e99162ab1d93fa5d9f97c8dcb460674f0dd5a 100644 (file)
@@ -41,9 +41,9 @@ void
 DynBuf_Init(DynBuf *b); // OUT
 
 void
-DynBuf_InitWithData(DynBuf *b,
-                    size_t dataSize,
-                    void *data);
+DynBuf_InitWithMemory(DynBuf *b,
+                      size_t dataSize,
+                      void *data);
 
 void
 DynBuf_Destroy(DynBuf *b); // IN
index ed68a30831454a62127d60a0cf3f6394eb371f0a..8d88ce6aea31279aced9a5aa1b42aebd9f5bd079 100644 (file)
@@ -36,7 +36,8 @@
  *
  * DynBuf_Init --
  *
- *      Dynamic buffer constructor --hpreg
+ *      Dynamic buffer constructor. The dynamic buffer is empty and starts
+ *      with no memory allocated.
  *
  * Results:
  *      None
@@ -61,10 +62,10 @@ DynBuf_Init(DynBuf *b)  // OUT:
 /*
  *-----------------------------------------------------------------------------
  *
- * DynBuf_InitWithData --
+ * DynBuf_InitWithMemory --
  *
- *      Dynamic buffer constructor - starting with the specified memory
- *      allocation.
+ *      Dynamic buffer constructor. The dynamic buffer is empty but starts with
+ *      the specified memory allocation.
  *
  * Results:
  *      None
@@ -76,9 +77,9 @@ DynBuf_Init(DynBuf *b)  // OUT:
  */
 
 void
-DynBuf_InitWithData(DynBuf *b,        // IN/OUT:
-                    size_t dataSize,  // IN:
-                    void *data)       // IN:
+DynBuf_InitWithMemory(DynBuf *b,        // IN/OUT:
+                      size_t dataSize,  // IN:
+                      void *data)       // IN:
 {
    ASSERT(b);
    ASSERT(dataSize != 0);