summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2005-09-20 19:04:02 (GMT)
committerArmin Rigo <arigo@tunes.org>2005-09-20 19:04:02 (GMT)
commit335ffe88bb5e6241efe85693c3f40c0bd2f81bce (patch)
treec1ca29ee7e0b1138451374f1d1f2139f910c8a55 /Modules/mmapmodule.c
parentf87902448753ece981b5df938c070320705e5dec (diff)
downloadcpython-335ffe88bb5e6241efe85693c3f40c0bd2f81bce.zip
cpython-335ffe88bb5e6241efe85693c3f40c0bd2f81bce.tar.gz
cpython-335ffe88bb5e6241efe85693c3f40c0bd2f81bce.tar.bz2
C89 compliance.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index f58e0f1..dd7c16f 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -421,12 +421,12 @@ mmap_resize_method(mmap_object *self,
return NULL;
#else
} else {
+ void *newmap;
+
if (ftruncate(self->fd, new_size) == -1) {
PyErr_SetFromErrno(mmap_module_error);
return NULL;
}
-
- void *newmap;
#ifdef MREMAP_MAYMOVE
newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);