aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2014-02-27 16:02:12 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2014-02-27 16:05:36 -0500
commitb2745c6092cccd3406427d91637217cc29cd40d3 (patch)
tree0bf5f889715b12416031f3a9e23a5051ee52f156
parenta8f4bf42ee73ede0d2d3ddaf6c312c756c042a6b (diff)
Update string formatting for new arb ID size.
-rw-r--r--src/isotp/isotp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/isotp/isotp.c b/src/isotp/isotp.c
index ad693416..ce87f1bd 100644
--- a/src/isotp/isotp.c
+++ b/src/isotp/isotp.c
@@ -1,5 +1,6 @@
#include <isotp/isotp.h>
#include <bitfield/bitfield.h>
+#include <inttypes.h>
/* void isotp_set_timeout(IsoTpHandler* handler, uint16_t timeout_ms) { */
/* handler->timeout_ms = timeout_ms; */
@@ -18,7 +19,7 @@ IsoTpShims isotp_init_shims(LogShim log, SendCanMessageShim send_can_message,
void isotp_message_to_string(const IsoTpMessage* message, char* destination,
size_t destination_length) {
- snprintf(destination, destination_length, "ID: 0x%02x, Payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x",
+ snprintf(destination, destination_length, "ID: 0x%" SCNd32 ", Payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x",
message->arbitration_id,
message->payload[0],
message->payload[1],