bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33804: [PATCH] * src/editfns.c (insert-char): Skip unnecessary fixnu


From: Nicholas Drozd
Subject: bug#33804: [PATCH] * src/editfns.c (insert-char): Skip unnecessary fixnum check
Date: Wed, 19 Dec 2018 10:48:24 -0600

COUNT gets set to 1 when it is passed in as nil, and in that case
there is no need to check its type.
---
 src/editfns.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/editfns.c b/src/editfns.c
index 8df4ed107e..9bfab74a9a 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1471,7 +1471,8 @@ called interactively, INHERIT is t.  */)
   CHECK_CHARACTER (character);
   if (NILP (count))
     XSETFASTINT (count, 1);
-  CHECK_FIXNUM (count);
+  else
+    CHECK_FIXNUM (count);
   c = XFIXNAT (character);

   if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
-- 
2.17.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]