From: Eli Zaretskii Date: Wed, 6 Feb 2002 19:12:14 +0000 (+0000) Subject: (get_charset_id): Use if-else instead of ?:. X-Git-Tag: ttn-vms-21-2-B4~16813 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1a45ff104afe974b08a431916b5541b90fbc4dc6;p=emacs.git (get_charset_id): Use if-else instead of ?:. --- diff --git a/src/charset.c b/src/charset.c index 5ff3be8c9a4..ff177a6cb29 100644 --- a/src/charset.c +++ b/src/charset.c @@ -597,11 +597,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