emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 630df05: * src/lisp.h (STRING_SET_CHARS): Simplify


From: Paul Eggert
Subject: [Emacs-diffs] master 630df05: * src/lisp.h (STRING_SET_CHARS): Simplify assertion.
Date: Mon, 17 Apr 2017 10:56:36 -0400 (EDT)

branch: master
commit 630df0587e1069b2cd2f2536d5fb61175adac3a2
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    * src/lisp.h (STRING_SET_CHARS): Simplify assertion.
---
 src/lisp.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lisp.h b/src/lisp.h
index e0bad58..daf57ed 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1371,8 +1371,9 @@ STRING_SET_CHARS (Lisp_Object string, ptrdiff_t newsize)
 {
   /* This function cannot change the size of data allocated for the
      string when it was created.  */
-  eassert ((STRING_MULTIBYTE (string) && newsize <= SBYTES (string))
-          || (!STRING_MULTIBYTE (string) && newsize == SCHARS (string)));
+  eassert (STRING_MULTIBYTE (string)
+          ? newsize <= SBYTES (string)
+          : newsize == SCHARS (string));
   XSTRING (string)->size = newsize;
 }
 



reply via email to

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