From d513ecac9c239c3a2c84f87db23f884cda6b6a2d Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 11 Sep 2017 10:56:03 +0200 Subject: [PATCH] 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 --- phc_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phc_ctl.c b/phc_ctl.c index 461f2ac..a4daa4e 100644 --- a/phc_ctl.c +++ b/phc_ctl.c @@ -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;