public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.dentz@gmail.com, brian.gix@intel.com
Subject: [PATCH BlueZ] tools: Use portable 64 bit data formats
Date: Thu, 17 Nov 2022 12:21:50 -0800	[thread overview]
Message-ID: <20221117202150.56236-1-brian.gix@intel.com> (raw)

The isotest executable was using the non-portable %zd string formatter
for loging 64 bit integers. This replaces them with PRId64.
---
 tools/isotest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/isotest.c b/tools/isotest.c
index 8a50bfee8..dcd087ee1 100644
--- a/tools/isotest.c
+++ b/tools/isotest.c
@@ -30,6 +30,7 @@
 #include <sys/uio.h>
 #include <linux/sockios.h>
 #include <time.h>
+#include <inttypes.h>
 
 #include "lib/bluetooth.h"
 #include "lib/hci.h"
@@ -589,12 +590,12 @@ static void send_wait(struct timespec *t_start, uint32_t us)
 	delta_us = us - TS_USEC(&t_diff);
 
 	if (delta_us < 0) {
-		syslog(LOG_INFO, "Send is behind: %zd us", delta_us);
+		syslog(LOG_INFO, "Send is behind: %" PRId64 " us", delta_us);
 		delta_us = 1000;
 	}
 
 	if (!quiet)
-		syslog(LOG_INFO, "Waiting (%zd us)...", delta_us);
+		syslog(LOG_INFO, "Waiting (%" PRId64 " us)...", delta_us);
 
 	usleep(delta_us);
 
-- 
2.38.1


             reply	other threads:[~2022-11-17 20:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 20:21 Brian Gix [this message]
2022-11-17 21:24 ` [BlueZ] tools: Use portable 64 bit data formats bluez.test.bot
2022-11-18  0:30 ` [PATCH BlueZ] " 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=20221117202150.56236-1-brian.gix@intel.com \
    --to=brian.gix@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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