[binutils-gdb] gas: don't open-code IS_WHITESPACE() / IS_NEWLINE()

Jan Beulich jbeulich@sourceware.org
Thu Jul 11 10:27:42 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0cec3ce5705b14bfc693c54ab47b65635744b4ce

commit 0cec3ce5705b14bfc693c54ab47b65635744b4ce
Author: Jan Beulich <jbeulich@suse.com>
Date:   Thu Jul 11 12:27:18 2024 +0200

    gas: don't open-code IS_WHITESPACE() / IS_NEWLINE()
    
    Better be consistent in use of the wrapper macros, which imo also helps
    readability.

Diff:
---
 gas/app.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gas/app.c b/gas/app.c
index b268b66b8f0..acddd70d134 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -851,7 +851,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
 	  if (ch != '\0'
 	      && (*mri_state == ch
 		  || (*mri_state == ' '
-		      && lex[ch] == LEX_IS_WHITESPACE)
+		      && IS_WHITESPACE (ch))
 		  || (*mri_state == '0'
 		      && ch == '1')))
 	    {
@@ -859,8 +859,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
 	      ++mri_state;
 	    }
 	  else if (*mri_state != '\0'
-		   || (lex[ch] != LEX_IS_WHITESPACE
-		       && lex[ch] != LEX_IS_NEWLINE))
+		   || (!IS_WHITESPACE (ch) && !IS_NEWLINE (ch)))
 	    {
 	      /* We did not get the expected character, or we didn't
 		 get a valid terminating character after seeing the


More information about the Binutils-cvs mailing list