commit
4e48b5d2debaf ("Refactoring: add back constness of public API structures")
changes the type of the first argument received by context callbacks
from a struct lttng_ust_ctx_field pointer to a void private data pointer.
That commit failed to change some call sites, which were still passing
the struct lttng_ust_ctx_field pointer rather than the private data
pointer. This was not caught by compiler errors because we are loosening
from a structure pointer to a void pointer.
Fixes: #1303
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I653f454b5dc4cfcc229b3a0e17b2dc6abe9fd658
return;
for (i = 0; i < ctx->nr_fields; i++) {
if (ctx->fields[i].destroy)
- ctx->fields[i].destroy(&ctx->fields[i]);
+ ctx->fields[i].destroy(ctx->fields[i].priv);
}
free(ctx->fields);
free(ctx);
return;
}
for (i = 0; i < ctx->nr_fields; i++)
- offset += ctx->fields[i].get_size(&ctx->fields[i], offset);
+ offset += ctx->fields[i].get_size(ctx->fields[i].priv, offset);
*ctx_len = offset;
}
return;
lttng_ust_lib_ring_buffer_align_ctx(bufctx, ctx->largest_align);
for (i = 0; i < ctx->nr_fields; i++)
- ctx->fields[i].record(&ctx->fields[i], bufctx, chan);
+ ctx->fields[i].record(ctx->fields[i].priv, bufctx, chan);
}
/*