From ccd989bdc2656b153bc226462e0c13800810ae04 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 4 May 2014 15:43:35 -0400 Subject: Add k5_buf_get_space Add a new k5_buf method to make room in the buffer for the caller to fill in. --- src/include/k5-buf.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include') diff --git a/src/include/k5-buf.h b/src/include/k5-buf.h index c5576a3e3..da10fd9f4 100644 --- a/src/include/k5-buf.h +++ b/src/include/k5-buf.h @@ -91,6 +91,10 @@ void k5_buf_add_fmt(struct k5buf *buf, const char *fmt, ...) #endif ; +/* Extend the length of buf by len and return a pointer to the reserved space, + * to be filled in by the caller. Return NULL on error. */ +void *k5_buf_get_space(struct k5buf *buf, size_t len); + /* Truncate BUF. LEN must be between 0 and the existing buffer * length, or an assertion failure will result. */ void k5_buf_truncate(struct k5buf *buf, size_t len); -- cgit