diff mbox series

[BlueZ,3/3] tools: fix printf format strings

Message ID 20220923105141.20176-3-ceggers@arri.de (mailing list archive)
State Accepted
Commit e01e89179d4ef8016f5593674834084ca549ca2a
Headers show
Series [BlueZ,1/3] client/player: fix printf format string | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS

Commit Message

Christian Eggers Sept. 23, 2022, 10:51 a.m. UTC
time_t is 64 bit (long long) on many 32 bit platforms (e.g. ARM) now
---
 tools/l2test.c | 5 +++--
 tools/rctest.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/l2test.c b/tools/l2test.c
index fbaca747eaaa..5aae4b687518 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -893,8 +893,9 @@  static void recv_mode(int sk)
 					timestamp = 0;
 					memset(ts, 0, sizeof(ts));
 				} else {
-					sprintf(ts, "[%ld.%ld] ",
-							tv.tv_sec, tv.tv_usec);
+					sprintf(ts, "[%lld.%lld] ",
+							(long long)tv.tv_sec,
+							(long long)tv.tv_usec);
 				}
 			}
 
diff --git a/tools/rctest.c b/tools/rctest.c
index 9eb8210d6eb2..269503701e6b 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -500,8 +500,9 @@  static void recv_mode(int sk)
 					timestamp = 0;
 					memset(ts, 0, sizeof(ts));
 				} else {
-					sprintf(ts, "[%ld.%ld] ",
-							tv.tv_sec, tv.tv_usec);
+					sprintf(ts, "[%lld.%lld] ",
+							(long long)tv.tv_sec,
+							(long long)tv.tv_usec);
 				}
 			}