diff options
author | Matija Skala <mskala@gmx.com> | 2017-05-19 14:36:40 +0200 |
---|---|---|
committer | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2017-05-19 14:40:07 +0200 |
commit | 0060bb8f5bbad433bc29405cc76b955d3125d8e9 (patch) | |
tree | 99f2b0efc724cb6ab29875f91b6b7a0f15d00c9e /src/timesync | |
parent | 3bd7ef833caae7431a9c50450ce7b303234d45eb (diff) | |
download | systemd-0060bb8f5bbad433bc29405cc76b955d3125d8e9.tar.gz |
timesync/timesyncd-manager: fix format-specifier issue
timex::time::tv_sec can have different sizes depending on the
host architecture. On x32 in particular, it is 8 bytes
long while the long int type is only 4 bytes long. Hence,
using li as a format specifier will trigger a format
error. Thus, better use PRI_TIME instead of li which is
actually the right format specifier to use for time_t.
Diffstat (limited to 'src/timesync')
-rw-r--r-- | src/timesync/timesyncd-manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 11c495e291..ae8514550a 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -378,7 +378,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) { m->drift_ppm = tmx.freq / 65536; log_debug(" status : %04i %s\n" - " time now : %li.%03"PRI_USEC"\n" + " time now : %"PRI_TIME".%03"PRI_USEC"\n" " constant : %"PRI_TIMEX"\n" " offset : %+.3f sec\n" " freq offset : %+"PRI_TIMEX" (%i ppm)\n", |