aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-06-21 21:55:56 +0000
committerKim F. Storm2004-06-21 21:55:56 +0000
commitdbadb64b380769deacc0fd013197c11d25d6c197 (patch)
treeeb75e69e16d234814e9c84c88d072a4cecf74c71 /src
parent799c08aca56838055c03bd84a7c7065d44961e3d (diff)
downloademacs-dbadb64b380769deacc0fd013197c11d25d6c197.tar.gz
emacs-dbadb64b380769deacc0fd013197c11d25d6c197.zip
(add_to_log): Use SAFE_ALLOCA.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index cd712ac7485..c92a8ee79d2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6315,6 +6315,7 @@ add_to_log (format, arg1, arg2)
6315 char *buffer; 6315 char *buffer;
6316 int len; 6316 int len;
6317 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 6317 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
6318 USE_SAFE_ALLOCA;
6318 6319
6319 /* Do nothing if called asynchronously. Inserting text into 6320 /* Do nothing if called asynchronously. Inserting text into
6320 a buffer may call after-change-functions and alike and 6321 a buffer may call after-change-functions and alike and
@@ -6331,10 +6332,12 @@ add_to_log (format, arg1, arg2)
6331 msg = Fformat (3, args); 6332 msg = Fformat (3, args);
6332 6333
6333 len = SBYTES (msg) + 1; 6334 len = SBYTES (msg) + 1;
6334 buffer = (char *) alloca (len); 6335 SAFE_ALLOCA (buffer, char *, len);
6335 bcopy (SDATA (msg), buffer, len); 6336 bcopy (SDATA (msg), buffer, len);
6336 6337
6337 message_dolog (buffer, len - 1, 1, 0); 6338 message_dolog (buffer, len - 1, 1, 0);
6339 SAFE_FREE (len);
6340
6338 UNGCPRO; 6341 UNGCPRO;
6339} 6342}
6340 6343