summaryrefslogtreecommitdiff
path: root/contrib/ntp/libntp/mstolfp.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/libntp/mstolfp.c')
-rw-r--r--contrib/ntp/libntp/mstolfp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/ntp/libntp/mstolfp.c b/contrib/ntp/libntp/mstolfp.c
index 7da20dc911e2..3dfc4efd42e8 100644
--- a/contrib/ntp/libntp/mstolfp.c
+++ b/contrib/ntp/libntp/mstolfp.c
@@ -22,7 +22,7 @@ mstolfp(
/*
* We understand numbers of the form:
*
- * [spaces][-][digits][.][digits][spaces|\n|\0]
+ * [spaces][-|+][digits][.][digits][spaces|\n|\0]
*
* This is one enormous hack. Since I didn't feel like
* rewriting the decoding routine for milliseconds, what
@@ -35,9 +35,8 @@ mstolfp(
while (isspace((unsigned char)*cp))
cp++;
- if (*cp == '-') {
- *bp++ = '-';
- cp++;
+ if (*cp == '-' || *cp == '+') {
+ *bp++ = *cp++;
}
if (*cp != '.' && !isdigit((unsigned char)*cp))