mirror of https://gerrit.osmocom.org/libosmocore
Philipp Maier
9b1e22d8d5
The member data[0] in struct osmo_ecu_state is used as an anchor to attach private structs for a concrete ECU implementation. This works by allocating more memory then struct osmo_ecu_state actually needs and then using the excess memory to store the private struct of the concrete ECU implementation. However, this poses a problem since data[0] is at the end of the struct it may land in an unaligned position. This also means that the struct we store there is also unaligned. We should fix this enclosing the public struct osmo_ecu_state into our private struct fr_ecu_state. Then we can use container_of to cast from osmo_ecu_state to fr_ecu_state and correct alignment is ensured as well. Related: OS#6286 Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7 |
||
---|---|---|
.. | ||
Makefile.am | ||
ecu.c | ||
ecu_fr.c | ||
ecu_fr_old.c | ||
gsm610.c | ||
gsm620.c | ||
gsm660.c | ||
gsm690.c |