* Refactoring: use offsetof macro at several places

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>