Fix a sign-extension bug in xntpdc's "kerninfo" output for on 64-bit

machines.  Negative pll offset values were printed as large positive
numbers.
This commit is contained in:
John Polstra 1999-05-21 16:10:44 +00:00
parent 925fa5c3f5
commit 57e60f2506
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47365

View file

@ -2396,7 +2396,7 @@ kerninfo(pcmd, fp)
* pll variables
*/
(void)fprintf(fp, "pll offset: %ld us\n",
(u_long)ntohl(ik->offset));
(long)(int32_t)ntohl(ik->offset));
(void)fprintf(fp, "pll frequency: %s ppm\n",
fptoa((s_fp)ntohl(ik->freq), 3));
(void)fprintf(fp, "maximum error: %ld us\n",