]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: replace sizeof of event header with offsetof
authorSteven Rostedt <srostedt@redhat.com>
Tue, 3 Mar 2009 18:53:07 +0000 (13:53 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Wed, 4 Mar 2009 01:52:01 +0000 (20:52 -0500)
commita22595ff249b6059ae83bb9112fffea6904ea0da
tree71ae10423f61c30d8a6c9cb08779b2f1066c89ad
parentafc70a85f4f6f676a0b51e952017fb9c40f10c4e
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: Steven Rostedt <srostedt@redhat.com>
kernel/trace/ring_buffer.c