]> granicus.if.org Git - python/commitdiff
Remove a redundant check from list_slice() and list_ass_slice().
authorGuido van Rossum <guido@python.org>
Wed, 7 Oct 1998 13:24:13 +0000 (13:24 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 7 Oct 1998 13:24:13 +0000 (13:24 +0000)
Noted by Greg Stein.

Objects/listobject.c

index 4e9ad0cb57680ca8c045289951fcd0467dcc8ec1..f2c295e859909ddc4ed2090e468f50c35ab18233 100644 (file)
@@ -326,8 +326,6 @@ list_slice(a, ilow, ihigh)
                ilow = 0;
        else if (ilow > a->ob_size)
                ilow = a->ob_size;
-       if (ihigh < 0)
-               ihigh = 0;
        if (ihigh < ilow)
                ihigh = ilow;
        else if (ihigh > a->ob_size)
@@ -452,8 +450,6 @@ list_ass_slice(a, ilow, ihigh, v)
                ilow = 0;
        else if (ilow > a->ob_size)
                ilow = a->ob_size;
-       if (ihigh < 0)
-               ihigh = 0;
        if (ihigh < ilow)
                ihigh = ilow;
        else if (ihigh > a->ob_size)