Skip to content

Commit

Permalink
tools: Use portable 64 bit data formats
Browse files Browse the repository at this point in the history
The isotest executable was using the non-portable %zd string formatter
for loging 64 bit integers. This replaces them with PRId64.
  • Loading branch information
bgix authored and Vudentz committed Nov 17, 2022
1 parent e2b2b16 commit 818adf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/isotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 818adf2

Please sign in to comment.