Attention is currently required from: dexter, laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )
Change subject: ecu: force alignment of member data in struct osmo_ecu_state ......................................................................
Patch Set 4: Code-Review+1
(3 comments)
Patchset:
PS4: I don't see any good reason not to use container_of here instead of casting.
File src/codec/ecu_fr.c:
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/18f6223c_7d3d57c8 PS4, Line 92: struct osmo_ecu_state ecu_state; Add a comment that ecu_state should be the first in the struct.
If you used container_of, this wouldn't be required.
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/6e097f90_5147b26e PS4, Line 294: return (struct osmo_ecu_state*) fr; while the cast is fine, the container_of would probably be safer and would allow this struct to be anywhere, with no real cost (a few arithmetic operations).