From: Eli Zaretskii Date: Wed, 6 Feb 2002 19:08:44 +0000 (+0000) Subject: (get_charset_id): Use if-else instead of ?:. X-Git-Tag: emacs-21.2~108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6fbba3282f0e2e375ba1a6e563226d2d7249e285;p=emacs.git (get_charset_id): Use if-else instead of ?:. --- diff --git a/src/ChangeLog b/src/ChangeLog index 942d702748a..241bedb967c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-02-06 Eli Zaretskii + + * charset.c (get_charset_id): Use if-else instead of ?:. + 2001-02-06 Richard M. Stallman * coding.c (code_convert_region): Update coding->cmp_data->char_offset diff --git a/src/charset.c b/src/charset.c index d1c86342f95..d630ec995d6 100644 --- a/src/charset.c +++ b/src/charset.c @@ -599,11 +599,15 @@ get_charset_id (charset_symbol) Lisp_Object val; int charset; - return ((SYMBOLP (charset_symbol) - && (val = Fget (charset_symbol, Qcharset), VECTORP (val)) - && (charset = XINT (XVECTOR (val)->contents[CHARSET_ID_IDX]), - CHARSET_VALID_P (charset))) - ? charset : -1); + /* This originally used a ?: operator, but reportedly the HP-UX + compiler version HP92453-01 A.10.32.22 miscompiles that. */ + if (SYMBOLP (charset_symbol) + && VECTORP (val = Fget (charset_symbol, Qcharset)) + && CHARSET_VALID_P (charset = + XINT (XVECTOR (val)->contents[CHARSET_ID_IDX]))) + return charset; + else + return -1; } /* Return an identification number for a new private charset of