]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
rl78: use is_whitespace()
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:19:17 +0000 (12:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Feb 2025 11:19:17 +0000 (12:19 +0100)
Replace open-coded checks and convert ISSPACE() uses. At the same time
use is_end_of_stmt() instead of an open-coded check in adjacent code.

gas/config/rl78-parse.y
gas/config/tc-rl78.c

index 006eb7d00dfc72deac0f774361dfbb1adaacdd94..a2dcacf8f2fe2b865fb4b546e9ec0e0307afaaa9 100644 (file)
@@ -1379,7 +1379,7 @@ find_bit_index (char *tok)
        {
          last_digit = tok;
        }
-      else if (ISSPACE (*tok))
+      else if (is_whitespace (*tok))
        {
          /* skip */
        }
@@ -1403,7 +1403,7 @@ rl78_lex (void)
   char * save_input_pointer;
   char * bit = NULL;
 
-  while (ISSPACE (*rl78_lex_start)
+  while (is_whitespace (*rl78_lex_start)
         && rl78_lex_start != rl78_lex_end)
     rl78_lex_start ++;
 
index bcdc87399d341352947b26ec1c568634a2bed567..7492d3ccb3c371379d1c95bc681da399bc3bb8ff 100644 (file)
@@ -425,12 +425,11 @@ md_number_to_chars (char * buf, valueT val, int n)
 static void
 require_end_of_expr (const char *fname)
 {
-  while (* input_line_pointer == ' '
-        || * input_line_pointer == '\t')
+  while (is_whitespace (* input_line_pointer))
     input_line_pointer ++;
 
-  if (! * input_line_pointer
-      || strchr ("\n\r,", * input_line_pointer)
+  if (is_end_of_stmt (* input_line_pointer)
+      || * input_line_pointer == ','
       || strchr (comment_chars, * input_line_pointer)
       || strchr (line_comment_chars, * input_line_pointer)
       || strchr (line_separator_chars, * input_line_pointer))