mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
shl: remove custom offsetof helpers
Use the generic shl_container_of() instead of all the custom helpers. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
12bf5e026e
commit
4f55a01dc3
3 changed files with 7 additions and 14 deletions
|
@ -74,7 +74,7 @@ struct peer {
|
|||
};
|
||||
|
||||
#define peer_from_htable(_p) \
|
||||
shl_htable_offsetof((_p), struct peer, p2p_mac)
|
||||
shl_htable_entry((_p), struct peer, p2p_mac)
|
||||
|
||||
int peer_new(struct link *l,
|
||||
const char *p2p_mac,
|
||||
|
@ -125,7 +125,7 @@ struct link {
|
|||
};
|
||||
|
||||
#define link_from_htable(_l) \
|
||||
shl_htable_offsetof((_l), struct link, ifindex)
|
||||
shl_htable_entry((_l), struct link, ifindex)
|
||||
#define LINK_FIRST_PEER(_l) \
|
||||
SHL_HTABLE_FIRST_MACRO(&(_l)->peers, peer_from_htable)
|
||||
#define LINK_FOREACH_PEER(_i, _l) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue