From: Christian Eggers <ceggers@arri.de>
To: <linux-bluetooth@vger.kernel.org>
Cc: Christian Eggers <ceggers@arri.de>
Subject: [PATCH BlueZ 3/3] tools: fix printf format strings
Date: Fri, 23 Sep 2022 12:51:41 +0200 [thread overview]
Message-ID: <20220923105141.20176-3-ceggers@arri.de> (raw)
In-Reply-To: <20220923105141.20176-1-ceggers@arri.de>
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
next prev parent reply other threads:[~2022-09-23 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 10:51 [PATCH BlueZ 1/3] client/player: fix printf format string Christian Eggers
2022-09-23 10:51 ` [PATCH BlueZ 2/3] monitor: fix printf format strings Christian Eggers
2022-09-23 10:51 ` Christian Eggers [this message]
2022-09-23 12:19 ` [BlueZ,1/3] client/player: fix printf format string bluez.test.bot
2022-09-26 18:00 ` [PATCH BlueZ 1/3] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220923105141.20176-3-ceggers@arri.de \
--to=ceggers@arri.de \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox