Skip to content

Commit

Permalink
tools: fix printf format strings
Browse files Browse the repository at this point in the history
time_t is 64 bit (long long) on many 32 bit platforms (e.g. ARM) now
  • Loading branch information
ceggers-arri authored and Vudentz committed Sep 26, 2022
1 parent fa8411c commit e01e891
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tools/l2test.c
Expand Up @@ -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);
}
}

Expand Down
5 changes: 3 additions & 2 deletions tools/rctest.c
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e01e891

Please sign in to comment.