]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
[Dynbuf] Rename DynBuf_GrowToFit to DynBuf_EnsureMinSize
authorOliver Kurth <okurth@vmware.com>
Fri, 20 Dec 2019 20:25:50 +0000 (12:25 -0800)
committerOliver Kurth <okurth@vmware.com>
Fri, 20 Dec 2019 20:25:50 +0000 (12:25 -0800)
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.

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

index b955a20a9341f458b34b63ff2f41c24c5cc4a440..6798cdc7585646bad8c853e3d4d1bc4c5ea13793 100644 (file)
@@ -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);
 }