container_of(definition, struct definition_sequence, p);
struct declaration_sequence *sequence_declaration =
sequence_definition->declaration;
- struct declaration *elem = sequence_declaration->elem;
+ struct bt_declaration *elem = sequence_declaration->elem;
struct ctf_stream_pos *pos = ctf_pos(ppos);
if (elem->id == CTF_TYPE_INTEGER) {
&& integer_declaration->p.alignment == CHAR_BIT) {
uint64_t len = bt_sequence_len(sequence_definition);
- ctf_align_pos(pos, integer_declaration->p.alignment);
+ if (!ctf_align_pos(pos, integer_declaration->p.alignment))
+ return -EFAULT;
if (!ctf_pos_access_ok(pos, len * CHAR_BIT))
return -EFAULT;
g_string_assign(sequence_definition->string, "");
g_string_insert_len(sequence_definition->string,
0, (char *) ctf_get_pos_addr(pos), len);
- ctf_move_pos(pos, len * CHAR_BIT);
+ if (!ctf_move_pos(pos, len * CHAR_BIT))
+ return -EFAULT;
return 0;
}
}
container_of(definition, struct definition_sequence, p);
struct declaration_sequence *sequence_declaration =
sequence_definition->declaration;
- struct declaration *elem = sequence_declaration->elem;
+ struct bt_declaration *elem = sequence_declaration->elem;
struct ctf_stream_pos *pos = ctf_pos(ppos);
if (elem->id == CTF_TYPE_INTEGER) {
&& integer_declaration->p.alignment == CHAR_BIT) {
uint64_t len = bt_sequence_len(sequence_definition);
- ctf_align_pos(pos, integer_declaration->p.alignment);
+ if (!ctf_align_pos(pos, integer_declaration->p.alignment))
+ return -EFAULT;
if (!ctf_pos_access_ok(pos, len * CHAR_BIT))
return -EFAULT;
memcpy((char *) ctf_get_pos_addr(pos),
sequence_definition->string->str, len);
- ctf_move_pos(pos, len * CHAR_BIT);
+ if (!ctf_move_pos(pos, len * CHAR_BIT))
+ return -EFAULT;
return 0;
}
}