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
parent
7092db3030
commit
d513ecac9c
|
@ -268,7 +268,7 @@ static int do_adj(clockid_t clkid, int cmdc, char *cmdv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse the double time offset argument */
|
/* 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) {
|
switch (r) {
|
||||||
case PARSED_OK:
|
case PARSED_OK:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue