Commit 5fac8af2 authored by Brett Cannon's avatar Brett Cannon

Checking if an unsigned long is < 0 is pointless.

Found by LLVM/clang 2.9.
parent a0b1ff58
......@@ -645,9 +645,9 @@ mmap_move_method(mmap_object *self, PyObject *args)
return NULL;
} else {
/* bounds check the values */
if (cnt < 0 || (cnt + dest) < cnt || (cnt + src) < cnt ||
src < 0 || src > self->size || (src + cnt) > self->size ||
dest < 0 || dest > self->size || (dest + cnt) > self->size) {
if ((cnt + dest) < cnt || (cnt + src) < cnt ||
src > self->size || (src + cnt) > self->size ||
dest > self->size || (dest + cnt) > self->size) {
PyErr_SetString(PyExc_ValueError,
"source, destination, or count out of range");
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment