Commit e679c518 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: elide an unneeded variable

No related merge requests found
Showing with 4 additions and 7 deletions
+4 -7
...@@ -1209,21 +1209,18 @@ int get_byte_kbinput(int kbinput) ...@@ -1209,21 +1209,18 @@ int get_byte_kbinput(int kbinput)
#ifdef ENABLE_UTF8 #ifdef ENABLE_UTF8
/* If the character in kbinput is a valid hexadecimal digit, multiply it /* If the character in kbinput is a valid hexadecimal digit, multiply it
* by factor and add the result to uni. */ * by factor and add the result to uni, and return ERR to signify okay. */
long add_unicode_digit(int kbinput, long factor, long *uni) long add_unicode_digit(int kbinput, long factor, long *uni)
{ {
long retval = ERR;
if ('0' <= kbinput && kbinput <= '9') if ('0' <= kbinput && kbinput <= '9')
*uni += (kbinput - '0') * factor; *uni += (kbinput - '0') * factor;
else if ('a' <= tolower(kbinput) && tolower(kbinput) <= 'f') else if ('a' <= tolower(kbinput) && tolower(kbinput) <= 'f')
*uni += (tolower(kbinput) - 'a' + 10) * factor; *uni += (tolower(kbinput) - 'a' + 10) * factor;
else else
/* If this character isn't a valid hexadecimal value, save it as /* The character isn't hexadecimal; give it as the result. */
* the result. */ return (long)kbinput;
retval = kbinput;
return retval; return ERR;
} }
/* Translate a Unicode sequence: turn a six-digit hexadecimal number /* Translate a Unicode sequence: turn a six-digit hexadecimal number
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment