aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorKen Raeburn2005-12-06 07:40:47 +0000
committerKen Raeburn2005-12-06 07:40:47 +0000
commit88fde92a48ab3e79ee91e0db62f775c28c77fa95 (patch)
tree7ac93e37f60d49d041cebce55b033808e0ac20c4 /src/undo.c
parent7723a3e52b00e7db534d576b5e3701a9defe63c4 (diff)
downloademacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.tar.gz
emacs-88fde92a48ab3e79ee91e0db62f775c28c77fa95.zip
(truncate_undo_list): Avoid dangerous side effects in NILP argument.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/undo.c b/src/undo.c
index 9839906ca7e..ecbb714fddd 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -378,11 +378,11 @@ truncate_undo_list (b)
378 && size_so_far > XINT (Vundo_outer_limit) 378 && size_so_far > XINT (Vundo_outer_limit)
379 && !NILP (Vundo_outer_limit_function)) 379 && !NILP (Vundo_outer_limit_function))
380 { 380 {
381 Lisp_Object temp = last_undo_buffer; 381 Lisp_Object temp = last_undo_buffer, tem;
382 382
383 /* Normally the function this calls is undo-outer-limit-truncate. */ 383 /* Normally the function this calls is undo-outer-limit-truncate. */
384 if (! NILP (call1 (Vundo_outer_limit_function, 384 tem = call1 (Vundo_outer_limit_function, make_number (size_so_far));
385 make_number (size_so_far)))) 385 if (! NILP (tem))
386 { 386 {
387 /* The function is responsible for making 387 /* The function is responsible for making
388 any desired changes in buffer-undo-list. */ 388 any desired changes in buffer-undo-list. */