]> arthur.barton.de Git - bup.git/commitdiff
Remove vestigial and inappropriate isnan()/isinf() timestamp tests.
authorRob Browning <rlb@defaultvalue.org>
Sat, 28 Dec 2013 18:18:51 +0000 (12:18 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 28 Dec 2013 18:44:07 +0000 (12:44 -0600)
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 <carpeddiem@gmail.com> for reporting the problem
(which prompted me to go ahead and create the separate fix).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index d9dcbed64451a9aada0ddea07d6aa238523a601f..0fd20cc233db19fc0152f1a98aa692abdffbb6c4 100644 (file)
@@ -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;
 }