about summary refs log tree commit diff
path: root/misc/iobuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/iobuf.h')
-rw-r--r--misc/iobuf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/iobuf.h b/misc/iobuf.h
index bdaf6eb..eca33b3 100644
--- a/misc/iobuf.h
+++ b/misc/iobuf.h
@@ -13,4 +13,6 @@ int buf_grow(struct io_buffer *iob, size_t size);
 int buf_write(struct io_buffer *iob, const void *data, size_t size);
 int buf_print(struct io_buffer *iob, const char *fmt, ...);
 
+#define buf_swrite(iob, s) buf_write(iob, s, sizeof(s) - 1)
+
 #endif