# HG changeset patch # User Andreas Schwab # Date 1116256600 0 # Node ID 788686743e76b911b578263420e0ce46ba559d00 # Parent 39bedd779f48864ce5868a18e6781b16bc6e5a7b (unexec_realloc): Move declarations before statements. diff -r 39bedd779f48 -r 788686743e76 src/unexmacosx.c --- a/src/unexmacosx.c Mon May 16 12:00:10 2005 +0000 +++ b/src/unexmacosx.c Mon May 16 15:16:40 2005 +0000 @@ -1,5 +1,5 @@ /* Dump Emacs in Mach-O format for use on Mac OS X. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1069,10 +1069,10 @@ if (ptr_in_unexec_regions (old_ptr)) { - p = (size_t *) malloc (new_size); size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size; size_t size = new_size > old_size ? old_size : new_size; + p = (size_t *) malloc (new_size); if (size) memcpy (p, old_ptr, size); }