lib/libvarnishapi/vsl_dispatch.c
static void
chunk_appendbuf(struct chunk *chunk, const uint32_t *ptr, size_t len)
{

	CHECK_OBJ_NOTNULL(chunk, CHUNK_MAGIC);
	assert(chunk->type == chunk_t_buf);
	if (chunk->buf.space < chunk->len + len) {
		while (chunk->buf.space < chunk->len + len)
			chunk->buf.space *= 2;
		chunk->buf.data = realloc(chunk->buf.data,
		    sizeof (uint32_t) * chunk->buf.space);
	}
	memcpy(chunk->buf.data + chunk->len, ptr, sizeof (uint32_t) * len);
	chunk->len += len;
}
/* Append a set of records to a chunk */
Append a set of records to a chunk
Append a set of records to a chunk
static void
chunk_appendbuf(struct chunk *chunk, const uint32_t *ptr, size_t len)
{
	CHECK_OBJ_NOTNULL(chunk, CHUNK_MAGIC);
	assert(chunk->type == chunk_t_buf);
	if (chunk->buf.space < chunk->len + len) {
		while (chunk->buf.space < chunk->len + len)
			chunk->buf.space *= 2;
		chunk->buf.data = realloc(chunk->buf.data,
		    sizeof (uint32_t) * chunk->buf.space);
	}
	memcpy(chunk->buf.data + chunk->len, ptr, sizeof (uint32_t) * len);
	chunk->len += len;
}
static void chunk_appendbuf ( struct chunk * chunk , const uint32_t * ptr , size_t len ) { CHECK_OBJ_NOTNULL ( chunk , CHUNK_MAGIC ) ; assert ( chunk -> type == chunk_t_buf ) ; if ( chunk -> buf . space < chunk -> len + len ) { while ( chunk -> buf . space < chunk -> len + len ) chunk -> buf . space *= 2 ; chunk -> buf . data = realloc ( chunk -> buf . data , sizeof ( uint32_t ) * chunk -> buf . space ) ; } memcpy ( chunk -> buf . data + chunk -> len , ptr , sizeof ( uint32_t ) * len ) ; chunk -> len += len ; }
Append a set of records to a chunk
Append a set of records to a chunk