]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: fix printing of negative poll in sources report again
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 6 Sep 2016 13:42:00 +0000 (15:42 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 7 Sep 2016 09:16:01 +0000 (11:16 +0200)
This was broken in commit 3f51805e6214cad5cb9a863491316937541601ec.

client.c

index 004149373d7a25ddeb4412f6b7afa863f0ddde2e..2572879fe708a568a2b8031745cc82de7a7f678f 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1997,7 +1997,7 @@ process_cmd_sources(char *line)
     print_report("%c%c %-27s  %2d  %2d   %3o  %I  %+S[%+S] +/- %S\n",
                  mode_ch, state_ch, name,
                  ntohs(reply.data.source_data.stratum),
-                 ntohs(reply.data.source_data.poll),
+                 (int16_t)ntohs(reply.data.source_data.poll),
                  ntohs(reply.data.source_data.reachability),
                  (unsigned long)ntohl(reply.data.source_data.since_sample),
                  UTI_FloatNetworkToHost(reply.data.source_data.latest_meas),