mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
canxl extension: use plain union instead of typedef
"In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef." https://www.kernel.org/doc/html/v5.0/process/coding-style.html#typedefs Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -299,7 +299,7 @@ static int setsockopt_txtime(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int do_send_one(int fd, cu_t *cu, size_t len, int timeout)
|
||||
static int do_send_one(int fd, union cfu *cu, size_t len, int timeout)
|
||||
{
|
||||
uint8_t control[CMSG_SPACE(sizeof(uint64_t))] = { 0 };
|
||||
struct iovec iov = {
|
||||
@@ -494,7 +494,7 @@ int main(int argc, char **argv)
|
||||
struct can_raw_vcid_options vcid_opts = {
|
||||
.flags = CAN_RAW_XL_VCID_TX_PASS,
|
||||
};
|
||||
static cu_t cu;
|
||||
static union cfu cu;
|
||||
int i;
|
||||
struct ifreq ifr = { 0 };
|
||||
const int enable_canfx = 1;
|
||||
|
||||
Reference in New Issue
Block a user