]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/lisp.h (STRING_SET_CHARS): Simplify assertion.
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>
Mon, 17 Apr 2017 14:56:08 +0000 (07:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Apr 2017 14:56:29 +0000 (07:56 -0700)
src/lisp.h

index e0bad58f758a1a72fb728bc7e1e59ac4e568d2f4..daf57ed906f1832717a0ecd0e71d6b9301eb58f8 100644 (file)
@@ -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;
 }