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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 --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);
 				}
 			}
 
-- 
2.35.3




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux