changeset 67339:7a9d49053af3

(truncate_undo_list): Avoid dangerous side effects in NILP argument.
author Ken Raeburn <raeburn@raeburn.org>
date Tue, 06 Dec 2005 07:40:14 +0000
parents ea1fabf8e347
children 52f474d67328
files src/undo.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Tue Dec 06 07:39:57 2005 +0000
+++ b/src/undo.c	Tue Dec 06 07:40:14 2005 +0000
@@ -378,11 +378,11 @@
       && size_so_far > XINT (Vundo_outer_limit)
       && !NILP (Vundo_outer_limit_function))
     {
-      Lisp_Object temp = last_undo_buffer;
+      Lisp_Object temp = last_undo_buffer, tem;
 
       /* Normally the function this calls is undo-outer-limit-truncate.  */
-      if (! NILP (call1 (Vundo_outer_limit_function,
-			 make_number (size_so_far))))
+      tem = call1 (Vundo_outer_limit_function, make_number (size_so_far));
+      if (! NILP (tem))
 	{
 	  /* The function is responsible for making
 	     any desired changes in buffer-undo-list.  */