1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00

* src/lisp.h (STRING_SET_CHARS): Simplify assertion.

This commit is contained in:
Paul Eggert 2017-04-17 07:56:08 -07:00 committed by Paul Eggert
parent edc63bf94f
commit 630df0587e

View 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;
}