mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
use a macro
the hex_asc_upper_lo macro which is defined before do the same thing.
This commit is contained in:
@@ -69,7 +69,7 @@ static inline void _put_id(char *buf, int end_offset, canid_t id)
|
|||||||
{
|
{
|
||||||
/* build 3 (SFF) or 8 (EFF) digit CAN identifier */
|
/* build 3 (SFF) or 8 (EFF) digit CAN identifier */
|
||||||
while (end_offset >= 0) {
|
while (end_offset >= 0) {
|
||||||
buf[end_offset--] = hex_asc_upper[id & 0xF];
|
buf[end_offset--] = hex_asc_upper_lo(id);
|
||||||
id >>= 4;
|
id >>= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user