From 243bab70d584b27a895b2af61b3ef30245709e87 Mon Sep 17 00:00:00 2001 From: Heydar Elahi Date: Wed, 9 Aug 2017 02:36:47 +0430 Subject: [PATCH 1/2] use a macro the hex_asc_upper_lo macro which is defined before do the same thing. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index fe18e0f..57d8704 100644 --- a/lib.c +++ b/lib.c @@ -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 */ while (end_offset >= 0) { - buf[end_offset--] = hex_asc_upper[id & 0xF]; + buf[end_offset--] = hex_asc_upper_lo(id); id >>= 4; } } From 23249c5cd8e9c8b19fc63558c454291f9b7a24ed Mon Sep 17 00:00:00 2001 From: Heydar Elahi Date: Wed, 9 Aug 2017 10:44:19 +0430 Subject: [PATCH 2/2] Protocol violation location mistake in error message I changed "id.28-to-id.28" to "id.28-to-id.21" --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 57d8704..ac34fe2 100644 --- a/lib.c +++ b/lib.c @@ -463,7 +463,7 @@ static const char *protocol_violation_types[] = { static const char *protocol_violation_locations[] = { "unspecified", "unspecified", - "id.28-to-id.28", + "id.28-to-id.21", "start-of-frame", "bit-srtr", "bit-ide",