diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2020-03-04 13:59:29 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2020-03-04 13:59:29 +0000 |
| commit | 5171bc9b11192d9ad273db7854787eaa65eb9997 (patch) | |
| tree | b872a53605ef14ae76de1104afb4be189d1a958a /libntp/dolfptoa.c | |
| parent | 360c01464aee3bc4c520898a675f35967db09ac2 (diff) | |
Diffstat (limited to 'libntp/dolfptoa.c')
| -rw-r--r-- | libntp/dolfptoa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libntp/dolfptoa.c b/libntp/dolfptoa.c index 68f56e1637e2..00e1faf793bc 100644 --- a/libntp/dolfptoa.c +++ b/libntp/dolfptoa.c @@ -13,7 +13,7 @@ char * dolfptoa( u_int32 fpi, u_int32 fpv, - int neg, + char sign, short ndec, int msec ) @@ -120,8 +120,8 @@ dolfptoa( cp = cpdec - 1; bp = buf; - if (neg) - *bp++ = '-'; + if (sign) + *bp++ = sign; while (cp < cpend) { if (cp == cpdec) *bp++ = '.'; @@ -150,7 +150,7 @@ mfptoa( M_NEG(fpi, fpf); } - return dolfptoa(fpi, fpf, isneg, ndec, FALSE); + return dolfptoa(fpi, fpf, (isneg?'-':'+'), ndec, FALSE); } @@ -168,7 +168,7 @@ mfptoms( M_NEG(fpi, fpf); } - return dolfptoa(fpi, fpf, isneg, ndec, TRUE); + return dolfptoa(fpi, fpf, (isneg?'-':'+'), ndec, TRUE); } |
