Mercurial > cpython-lru_cache-weakref
comparison Modules/arraymodule.c @ 68102:e2f96bd29252
Issue #8914: fix various warnings from the Clang static analyzer v254.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Tue, 22 Feb 2011 20:15:44 +0000 |
| parents | 2581a17b29af |
| children | b39270c6b8d1 |
comparison
equal
deleted
inserted
replaced
| 68101:a7515a94fdb5 | 68102:e2f96bd29252 |
|---|---|
| 874 Py_ssize_t size, i; | 874 Py_ssize_t size, i; |
| 875 | 875 |
| 876 if (Py_SIZE(self) > 0) { | 876 if (Py_SIZE(self) > 0) { |
| 877 if (n < 0) | 877 if (n < 0) |
| 878 n = 0; | 878 n = 0; |
| 879 items = self->ob_item; | |
| 880 if ((self->ob_descr->itemsize != 0) && | 879 if ((self->ob_descr->itemsize != 0) && |
| 881 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { | 880 (Py_SIZE(self) > PY_SSIZE_T_MAX / self->ob_descr->itemsize)) { |
| 882 return PyErr_NoMemory(); | 881 return PyErr_NoMemory(); |
| 883 } | 882 } |
| 884 size = Py_SIZE(self) * self->ob_descr->itemsize; | 883 size = Py_SIZE(self) * self->ob_descr->itemsize; |
