Such a simple operation should not need a full function call.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <
20171110110858.11482-1-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15796.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
return buf_write(dest, BPTR(src), BLEN(src));
}
-struct buffer
-clear_buf(void)
-{
- struct buffer buf;
- CLEAR(buf);
- return buf;
-}
-
void
free_buf(struct buffer *buf)
{
void buf_clear(struct buffer *buf);
-struct buffer clear_buf(void);
-
void free_buf(struct buffer *buf);
bool buf_assign(struct buffer *dest, const struct buffer *src);
freeaddrinfo((struct addrinfo *) addr);
}
+/** Return an empty struct buffer */
+static inline struct buffer
+clear_buf(void)
+{
+ return (struct buffer) { 0 };
+}
+
static inline bool
buf_defined(const struct buffer *buf)
{