Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct bt_ctf_field_type *get_field_type(enum field_type_alias alias)
{
unsigned int alignment, size;
- struct bt_ctf_field_type *field_type;
+ struct bt_ctf_field_type *field_type = NULL;
if (alias >= NR_FIELD_TYPE_ALIAS) {
- return NULL;
+ goto end;
}
alignment = field_type_aliases_alignments[alias];
size = field_type_aliases_sizes[alias];
field_type = bt_ctf_field_type_integer_create(size);
bt_ctf_field_type_set_alignment(field_type, alignment);
+end:
return field_type;
}