You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/09/17 13:20:14 UTC
[incubator-nuttx-apps] branch master updated: SLCAN: Fix incorrect
format identifier in print function
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 7cbe2db SLCAN: Fix incorrect format identifier in print function
7cbe2db is described below
commit 7cbe2db2c945e09d0d6758b7578c78fc82827bc8
Author: Jari van Ewijk <ja...@nxp.com>
AuthorDate: Fri Sep 17 13:44:59 2021 +0200
SLCAN: Fix incorrect format identifier in print function
---
canutils/slcan/slcan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/canutils/slcan/slcan.c b/canutils/slcan/slcan.c
index 674db52..4ebff93 100644
--- a/canutils/slcan/slcan.c
+++ b/canutils/slcan/slcan.c
@@ -258,20 +258,20 @@ int main(int argc, char *argv[])
if (nbytes == CAN_MTU)
{
reccount++;
- debug_print("R%d, Id:0x%X\n", reccount, frame.can_id);
+ debug_print("R%d, Id:0x%lX\n", reccount, frame.can_id);
if (frame.can_id & CAN_EFF_FLAG)
{
/* 29 bit address */
frame.can_id = frame.can_id & ~CAN_EFF_FLAG;
- sprintf(sbuf, "T%08X%d", frame.can_id, frame.len);
+ sprintf(sbuf, "T%08lX%d", frame.can_id, frame.len);
sbp = &sbuf[10];
}
else
{
/* 11 bit address */
- sprintf(sbuf, "t%03X%d", frame.can_id, frame.len);
+ sprintf(sbuf, "t%03lX%d", frame.can_id, frame.len);
sbp = &sbuf[5];
}