- field->event_field->name = "ip";
- field->event_field->type.atype = atype_integer;
- field->event_field->type.u.integer.size = sizeof(void *) * CHAR_BIT;
- field->event_field->type.u.integer.alignment = lttng_alignof(void *) * CHAR_BIT;
- field->event_field->type.u.integer.signedness = lttng_is_signed_type(void *);
- field->event_field->type.u.integer.reverse_byte_order = 0;
- field->event_field->type.u.integer.base = 16;
- field->event_field->type.u.integer.encoding = lttng_encode_none;
+ field->event_field->name = strdup("ip");
+ if (!field->event_field->name) {
+ ret = -ENOMEM;
+ goto error_name;
+ }
+ field->event_field->type = type;