]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use an unsigned cast to avoid a warning in VC++.
authorGuido van Rossum <guido@python.org>
Fri, 19 Mar 1999 21:50:11 +0000 (21:50 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 19 Mar 1999 21:50:11 +0000 (21:50 +0000)
Modules/arraymodule.c

index bb0a9edb33b42640c1f0c1f6b8a666c7b4ae2d33..8bd9a55f74947a8b1967b9d94997b9edc5e7e896 100644 (file)
@@ -939,7 +939,8 @@ array_fromfile(self, args)
                size_t newbytes;
                /* Be careful here about overflow */
                if ((newlength = self->ob_size + n) <= 0 ||
-                   (newbytes = newlength * itemsize) / itemsize != newlength)
+                   (newbytes = newlength * itemsize) / itemsize !=
+                   (size_t)newlength)
                        goto nomem;
                PyMem_RESIZE(item, char, newbytes);
                if (item == NULL) {