aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2005-05-16 15:17:55 +0000
committerAndreas Schwab2005-05-16 15:17:55 +0000
commit0da46b6eeabfc8afda14232976c2f823bce58491 (patch)
tree3159d20f97470295acd6c39008e845555130eaaa /src
parentb376642de60772f2aa1d2e5b540c70882ff2dd5f (diff)
downloademacs-0da46b6eeabfc8afda14232976c2f823bce58491.tar.gz
emacs-0da46b6eeabfc8afda14232976c2f823bce58491.zip
(unexec_realloc): Move declarations before statements.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/unexmacosx.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fd11243cbb0..66e4a8e4f05 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12005-05-16 Andreas Schwab <schwab@suse.de>
2
3 * unexmacosx.c (unexec_realloc): Move declarations before
4 statements.
5
12005-05-14 Richard M. Stallman <rms@gnu.org> 62005-05-14 Richard M. Stallman <rms@gnu.org>
2 7
3 * xdisp.c (message3): Call cancel_echoing. 8 * xdisp.c (message3): Call cancel_echoing.
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index fc369eab7cd..e54dbea448c 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,5 +1,5 @@
1/* Dump Emacs in Mach-O format for use on Mac OS X. 1/* Dump Emacs in Mach-O format for use on Mac OS X.
2 Copyright (C) 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -1069,10 +1069,10 @@ unexec_realloc (void *old_ptr, size_t new_size)
1069 1069
1070 if (ptr_in_unexec_regions (old_ptr)) 1070 if (ptr_in_unexec_regions (old_ptr))
1071 { 1071 {
1072 p = (size_t *) malloc (new_size);
1073 size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size; 1072 size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size;
1074 size_t size = new_size > old_size ? old_size : new_size; 1073 size_t size = new_size > old_size ? old_size : new_size;
1075 1074
1075 p = (size_t *) malloc (new_size);
1076 if (size) 1076 if (size)
1077 memcpy (p, old_ptr, size); 1077 memcpy (p, old_ptr, size);
1078 } 1078 }