projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f9cc29
)
mmap_flush_method(): Squash compiler warning about
author
Tim Peters
<tim.peters@gmail.com>
Fri, 17 Feb 2006 01:07:39 +0000
(
01:07
+0000)
committer
Tim Peters
<tim.peters@gmail.com>
Fri, 17 Feb 2006 01:07:39 +0000
(
01:07
+0000)
mixing signed and unsigned types in comparison.
Modules/mmapmodule.c
patch
|
blob
|
history
diff --git
a/Modules/mmapmodule.c
b/Modules/mmapmodule.c
index 58d74e6dbec16aa8a7a6589c1fc7bb958f5cad35..b777eff439ff86c1bdfdb456bd705d0488fbff31 100644
(file)
--- a/
Modules/mmapmodule.c
+++ b/
Modules/mmapmodule.c
@@
-471,9
+471,9
@@
mmap_flush_method(mmap_object *self, PyObject *args)
Py_ssize_t offset = 0;
Py_ssize_t size = self->size;
CHECK_VALID(NULL);
- if (!PyArg_ParseTuple(args, "|nn:flush", &offset, &size))
{
+ if (!PyArg_ParseTuple(args, "|nn:flush", &offset, &size))
return NULL;
-
} else if (
(offset + size) > self->size) {
+
if ((size_t)
(offset + size) > self->size) {
PyErr_SetString(PyExc_ValueError, "flush values out of range");
return NULL;
} else {