coverity/74717: FP: NULL Pointer Dereference

dynamic_buffer_ensure() allocates buf->data; add an assert to make this
clear to coverity.
This commit is contained in:
Justin M. Keyes 2014-12-16 00:56:44 -05:00
parent 4e28e1aeb6
commit 0891cb2db8

View File

@ -268,6 +268,7 @@ static int shell(const char *cmd,
static void dynamic_buffer_ensure(DynamicBuffer *buf, size_t desired)
{
if (buf->cap >= desired) {
assert(buf->data);
return;
}