From: Armin Rigo Date: Tue, 20 Sep 2005 19:04:42 +0000 (+0000) Subject: C89 compliance. X-Git-Tag: v2.4.2c1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e6a594ab1f38b9a2c92a8d44f2d8f191327ba9c;p=thirdparty%2FPython%2Fcpython.git C89 compliance. --- diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index a3a9857eb271..4d781bbef3fe 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);