]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not applicable to open-vm-tools
authorOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:54 +0000 (10:44 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 26 Oct 2018 17:44:54 +0000 (10:44 -0700)
open-vm-tools/lib/include/dynbuf.h

index f9978cc243ace4b8df34db5f8326e1face36e443..6c771f225bb994fdc1cee13c2b29cdb94e50e034 100644 (file)
@@ -280,6 +280,34 @@ DynBuf_AppendString(DynBuf *buf,         // IN/OUT
 }
 
 
+/*
+ *----------------------------------------------------------------------------
+ *
+ * DynBuf_SafeAppendString --
+ *
+ *     "Safe" version of the above that does not fail.
+ *
+ * Results:
+ *      None.
+ *
+ * Side effects:
+ *      DynBuf may change its size or allocate additional memory.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+#if defined(SWIG)
+static void
+#else
+static INLINE void
+#endif
+DynBuf_SafeAppendString(DynBuf *buf,         // IN/OUT
+                        const char *string)  // IN
+{
+   DynBuf_SafeAppend(buf, string, strlen(string) + 1 /* NUL */);
+}
+
+
 /*
  *----------------------------------------------------------------------------
  *