summaryrefslogtreecommitdiffstats
path: root/buffer.c
diff options
context:
space:
mode:
authorJuanJo Ciarlante <jjo@google.com>2009-09-19 18:33:40 +0200
committerJuanJo Ciarlante <juanjosec@gmail.com>2011-03-25 13:30:29 +0100
commit4d3df224e1210f732b84cf4273fb57993361d4ba (patch)
tree35c33c6e1fc7848361712450b8f156bd99a12d1a /buffer.c
parent387df51180cf9139abfbc33b141fd395a58633b5 (diff)
downloadopenvpn-4d3df224e1210f732b84cf4273fb57993361d4ba.tar.gz
openvpn-4d3df224e1210f732b84cf4273fb57993361d4ba.tar.xz
openvpn-4d3df224e1210f732b84cf4273fb57993361d4ba.zip
* fixed win32 non-ipv6 build
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index c43cb47..f69ec70 100644
--- a/buffer.c
+++ b/buffer.c
@@ -214,8 +214,10 @@ buf_printf (struct buffer *buf, const char *format, ...)
return ret;
}
-void buf_puts(struct buffer *buf, const char *str)
+bool
+buf_puts(struct buffer *buf, const char *str)
{
+ int ret = false;
uint8_t *ptr = BEND (buf);
int cap = buf_forward_capacity (buf);
if (cap > 0)
@@ -223,7 +225,9 @@ void buf_puts(struct buffer *buf, const char *str)
strncpynt ((char *)ptr,str, cap);
*(buf->data + buf->capacity - 1) = 0; /* windows vsnprintf needs this */
buf->len += (int) strlen ((char *)ptr);
+ ret = true;
}
+ return ret;
}