From: Oliver Kurth Date: Fri, 26 Oct 2018 17:44:54 +0000 (-0700) Subject: Common header file change not applicable to open-vm-tools X-Git-Tag: stable-11.0.0~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=444ef4fa635f89c1018e2563c31fc6f01450d942;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools --- diff --git a/open-vm-tools/lib/include/dynbuf.h b/open-vm-tools/lib/include/dynbuf.h index f9978cc24..6c771f225 100644 --- a/open-vm-tools/lib/include/dynbuf.h +++ b/open-vm-tools/lib/include/dynbuf.h @@ -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 */); +} + + /* *---------------------------------------------------------------------------- *