ring-buffer: replace sizeof of event header with offsetof
Impact: fix to possible alignment problems on some archs.
Some arch compilers include an NULL char array in the sizeof field.
Since the ring_buffer_event type includes one of these, it is better
to use the "offsetof" instead, to avoid strange bugs on these archs.
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
Showing
想要评论请 注册 或 登录