mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
corrected example to accurately reflect sockaddr_can structure
example code incorrectly accesses the `tp` field and will not build.
This commit is contained in:
parent
b7718454f9
commit
f41166226d
|
@ -369,8 +369,8 @@ to their default.
|
|||
|
||||
addr.can_family = AF_CAN;
|
||||
addr.can_ifindex = if_nametoindex("can0");
|
||||
addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
|
||||
addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
|
||||
addr.can_addr.tp.tx_id = 0x18DA42F1 | CAN_EFF_FLAG;
|
||||
addr.can_addr.tp.rx_id = 0x18DAF142 | CAN_EFF_FLAG;
|
||||
|
||||
ret = bind(s, (struct sockaddr *)&addr, sizeof(addr));
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user