phc_ctl: fix adj command to accept negative offset.

When parsing the argument, the minimum value should be -DBL_MAX instead
of DBL_MIN, which is the smallest positive value.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2017-09-11 10:56:03 +02:00 committed by Richard Cochran
parent 7092db3030
commit d513ecac9c
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ static int do_adj(clockid_t clkid, int cmdc, char *cmdv[])
}
/* parse the double time offset argument */
r = get_ranged_double(cmdv[0], &time_arg, DBL_MIN, DBL_MAX);
r = get_ranged_double(cmdv[0], &time_arg, -DBL_MAX, DBL_MAX);
switch (r) {
case PARSED_OK:
break;