libctf: create: fix vlen / vbytes confusion

The initial_vlen parameter to ctf_add_generic is misnamed: it's not the
initial vlen (the initial number of members of a struct, etc), but rather
the initial size of the vlen region.  We have a term for that, vbytes: use
it.

Amazingly this doesn't seem to have caused any bugs to creep in.
This commit is contained in:
Nick Alcock
2025-02-06 13:02:50 +00:00
parent dc93d01ff2
commit 97a72b2a35
2 changed files with 20 additions and 20 deletions

View File

@@ -179,7 +179,7 @@ typedef struct ctf_dtdef
ctf_list_t dtd_list; /* List forward/back pointers. */
ctf_id_t dtd_type; /* Type identifier for this definition. */
ctf_type_t dtd_data; /* Type node, including name. */
size_t dtd_vlen_alloc; /* Total vlen space allocated. */
size_t dtd_vlen_alloc; /* Total vlen space allocated (vbytes). */
unsigned char *dtd_vlen; /* Variable-length data for this type. */
} ctf_dtdef_t;