From: Rob Browning Date: Sat, 28 Dec 2013 18:18:51 +0000 (-0600) Subject: Remove vestigial and inappropriate isnan()/isinf() timestamp tests. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=89d566d25553b0256844bdacd494d7f27f0d45e3;p=packages%2Fb%2Fbup.git Remove vestigial and inappropriate isnan()/isinf() timestamp tests. I'm fairly sure this is an historical accident, but regardless, remove the (my) obviously inappropriate floating point tests on integer values from bup_parse_xutime_args(). Nothing to see here -- move along. I've broken this change out from a larger post-0.25 patch, where I'd already fixed it, so that it'll be easy to pull into stable if we like. Thanks to Ed Maste for reporting the problem (which prompted me to go ahead and create the separate fix). Signed-off-by: Rob Browning --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index d9dcbed..0fd20cc 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -787,49 +787,6 @@ static int bup_parse_xutime_args(char **path, access, access_ns, modification, modification_ns)) return 0; - - if (isnan(*access)) - { - PyErr_SetString(PyExc_ValueError, "access time is NaN"); - return 0; - } - else if (isinf(*access)) - { - PyErr_SetString(PyExc_ValueError, "access time is infinite"); - return 0; - } - else if (isnan(*modification)) - { - PyErr_SetString(PyExc_ValueError, "modification time is NaN"); - return 0; - } - else if (isinf(*modification)) - { - PyErr_SetString(PyExc_ValueError, "modification time is infinite"); - return 0; - } - - if (isnan(*access_ns)) - { - PyErr_SetString(PyExc_ValueError, "access time ns is NaN"); - return 0; - } - else if (isinf(*access_ns)) - { - PyErr_SetString(PyExc_ValueError, "access time ns is infinite"); - return 0; - } - else if (isnan(*modification_ns)) - { - PyErr_SetString(PyExc_ValueError, "modification time ns is NaN"); - return 0; - } - else if (isinf(*modification_ns)) - { - PyErr_SetString(PyExc_ValueError, "modification time ns is infinite"); - return 0; - } - return 1; }