mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-20 23:12:09 +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:
@@ -155,7 +155,7 @@ int hexstring2data(char *arg, unsigned char *data, int maxdlen)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int parse_canframe(char *cs, cu_t *cu)
|
||||
int parse_canframe(char *cs, union cfu *cu)
|
||||
{
|
||||
/* documentation see lib.h */
|
||||
|
||||
@@ -309,7 +309,7 @@ int parse_canframe(char *cs, cu_t *cu)
|
||||
return mtu;
|
||||
}
|
||||
|
||||
int snprintf_canframe(char *buf, size_t size, cu_t *cu, int sep)
|
||||
int snprintf_canframe(char *buf, size_t size, union cfu *cu, int sep)
|
||||
{
|
||||
/* documentation see lib.h */
|
||||
|
||||
@@ -433,7 +433,7 @@ int snprintf_canframe(char *buf, size_t size, cu_t *cu, int sep)
|
||||
return offset;
|
||||
}
|
||||
|
||||
int snprintf_long_canframe(char *buf, size_t size, cu_t *cu, int view)
|
||||
int snprintf_long_canframe(char *buf, size_t size, union cfu *cu, int view)
|
||||
{
|
||||
/* documentation see lib.h */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user