struct ctf_stream_pos *pos = ctf_pos(ppos);
int rbo = (integer_declaration->byte_order != BYTE_ORDER); /* reverse byte order */
- 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, integer_declaration->len))
return -EFAULT;
assert(0);
}
}
- ctf_move_pos(pos, integer_declaration->len);
+ if (!ctf_move_pos(pos, integer_declaration->len))
+ return -EFAULT;
return 0;
}
struct ctf_stream_pos *pos = ctf_pos(ppos);
int rbo = (integer_declaration->byte_order != BYTE_ORDER); /* reverse byte order */
- 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, integer_declaration->len))
return -EFAULT;
}
}
end:
- ctf_move_pos(pos, integer_declaration->len);
+ if (!ctf_move_pos(pos, integer_declaration->len))
+ return -EFAULT;
return 0;
}
return _aligned_integer_read(ppos, 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, integer_declaration->len))
return -EFAULT;
pos->offset, integer_declaration->len,
&integer_definition->value._signed);
}
- ctf_move_pos(pos, integer_declaration->len);
+ if (!ctf_move_pos(pos, integer_declaration->len))
+ return -EFAULT;
return 0;
}
return _aligned_integer_write(ppos, 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, integer_declaration->len))
return -EFAULT;
integer_definition->value._signed);
}
end:
- ctf_move_pos(pos, integer_declaration->len);
+ if (!ctf_move_pos(pos, integer_declaration->len))
+ return -EFAULT;
return 0;
}