aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.hpp
diff options
context:
space:
mode:
authorhryx <codroid@gmail.com>2019-06-23 12:31:22 -0700
committerhryx <codroid@gmail.com>2019-06-23 12:31:22 -0700
commitc423697c78462f4e817869a3b25e72af33ce09ed (patch)
tree9fa567896dbf4c4b34ac5afc3fa2c899e8275b66 /src/buffer.hpp
parent1c86a191da400bd47a5044a5b84cf9a05b15066b (diff)
parent9153b17c922e3166a824d300781ca4e6da015787 (diff)
downloadzig-c423697c78462f4e817869a3b25e72af33ce09ed.tar.gz
zig-c423697c78462f4e817869a3b25e72af33ce09ed.zip
Merge branch 'master' into translate-c-userland
Diffstat (limited to 'src/buffer.hpp')
-rw-r--r--src/buffer.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.hpp b/src/buffer.hpp
index 082d584e2c..d4a911fc21 100644
--- a/src/buffer.hpp
+++ b/src/buffer.hpp
@@ -27,11 +27,13 @@ Buf *buf_sprintf(const char *format, ...)
Buf *buf_vprintf(const char *format, va_list ap);
static inline size_t buf_len(Buf *buf) {
+ assert(buf);
assert(buf->list.length);
return buf->list.length - 1;
}
static inline char *buf_ptr(Buf *buf) {
+ assert(buf);
assert(buf->list.length);
return buf->list.items;
}