From: Oliver Kurth Date: Fri, 20 Dec 2019 20:25:50 +0000 (-0800) Subject: [Dynbuf] Rename DynBuf_GrowToFit to DynBuf_EnsureMinSize X-Git-Tag: stable-11.1.0~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=342004519d6cddf3a6521e26fc91b1a5c2afa5ad;p=thirdparty%2Fopen-vm-tools.git [Dynbuf] Rename DynBuf_GrowToFit to DynBuf_EnsureMinSize As suggested, GrowToFit isn't a verb, suggest renaming the function to DynBuf_EnsureMinSize, and change the description as "Ensure that the size of the DynBuf is at least 'size'" Change all references of DynBuf_GrowToFit to DynBuf_EnsureMinSize. --- diff --git a/open-vm-tools/lib/include/dynbuf.h b/open-vm-tools/lib/include/dynbuf.h index b955a20a9..6798cdc75 100644 --- a/open-vm-tools/lib/include/dynbuf.h +++ b/open-vm-tools/lib/include/dynbuf.h @@ -390,9 +390,9 @@ DynBuf_Strcat(DynBuf *buf, // IN/OUT /* *---------------------------------------------------------------------------- * - * DynBuf_GrowToFit -- + * DynBuf_EnsureMinSize -- * - * GrowToFit that dynbuf has enough room. + * Ensure that the size of the DynBuf is at least 'size'. * * Results: * TRUE on success @@ -409,8 +409,8 @@ static Bool #else static INLINE Bool #endif -DynBuf_GrowToFit(DynBuf *buf, // IN/OUT - size_t size) // IN +DynBuf_EnsureMinSize(DynBuf *buf, // IN/OUT + size_t size) // IN { return buf->allocated >= size ? TRUE : DynBuf_Enlarge(buf, size); }