summaryrefslogtreecommitdiff
path: root/contrib/ntp/libntp/dolfptoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/libntp/dolfptoa.c')
-rw-r--r--contrib/ntp/libntp/dolfptoa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c
index 68f56e1637e2..00e1faf793bc 100644
--- a/contrib/ntp/libntp/dolfptoa.c
+++ b/contrib/ntp/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);
}