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 <mlich...@redhat.com>
---
 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;
-- 
2.9.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to