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:
@@ -183,7 +183,7 @@ static void canfd_asc(struct canfd_frame *cf, int devno, int mtu,
|
||||
fprintf(outfile, " %8d %4d %8X 0 0 0 0 0", 130000, 130, flags);
|
||||
}
|
||||
|
||||
static void canxl_asc(cu_t *cu, int devno, int mtu,
|
||||
static void canxl_asc(union cfu *cu, int devno, int mtu,
|
||||
char *extra_info, FILE *outfile)
|
||||
{
|
||||
char id[10];
|
||||
@@ -314,7 +314,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
static char buf[BUFSZ], device[DEVSZ], afrbuf[AFRSZ], extra_info[EXTRASZ];
|
||||
|
||||
static cu_t cu;
|
||||
static union cfu cu;
|
||||
static struct timeval tv, start_tv;
|
||||
FILE *infile = stdin;
|
||||
FILE *outfile = stdout;
|
||||
|
||||
Reference in New Issue
Block a user