}
static inline
-unsigned char record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
+size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
struct channel *chan, size_t offset,
size_t *pre_header_padding,
struct lttng_ust_lib_ring_buffer_ctx *ctx)
handle);
struct lttng_channel *lttng_chan = channel_get_private(chan);
+ assert(header);
+ if (!header)
+ return;
header->magic = TSDL_MAGIC_NUMBER;
memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid));
header->checksum = 0; /* 0 if unused */
handle);
unsigned long records_lost = 0;
+ assert(header);
+ if (!header)
+ return;
header->content_size = data_size * CHAR_BIT; /* in bits */
header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
/*