From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:03 +0000 (-0700) Subject: Dynbuf: Improve documentation X-Git-Tag: stable-10.2.0~540 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8a9f44d31bf970367f7dc80dc95730b097ab2c0;p=thirdparty%2Fopen-vm-tools.git Dynbuf: Improve documentation InitWithMemory is a better name. Improve the init function descriptions. --- diff --git a/open-vm-tools/lib/include/dynbuf.h b/open-vm-tools/lib/include/dynbuf.h index 19ca5ad57..eb4e99162 100644 --- a/open-vm-tools/lib/include/dynbuf.h +++ b/open-vm-tools/lib/include/dynbuf.h @@ -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 diff --git a/open-vm-tools/lib/misc/dynbuf.c b/open-vm-tools/lib/misc/dynbuf.c index ed68a3083..8d88ce6ae 100644 --- a/open-vm-tools/lib/misc/dynbuf.c +++ b/open-vm-tools/lib/misc/dynbuf.c @@ -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);