* app.c (do_scrub_chars): Simplify string handling.
authorBen Elliston <bje@au.ibm.com>
Fri, 10 Mar 2006 10:57:18 +0000 (10:57 +0000)
committerBen Elliston <bje@au.ibm.com>
Fri, 10 Mar 2006 10:57:18 +0000 (10:57 +0000)
gas/ChangeLog
gas/app.c

index 5417f7e021fcea7e15f5b26b68d076d4f4eb939b..ac85baef355a01b7a1f379d9f435f6bcdb3933de 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-10  Ben Elliston  <bje@au.ibm.com>
+
+       * app.c (do_scrub_chars): Simplify string handling.
+
 2006-03-07  Richard Sandiford  <richard@codesourcery.com>
            Daniel Jacobowitz  <dan@codesourcery.com>
            Zack Weinberg  <zack@codesourcery.com>
index 3ff7f61e210a3038e106a70c4999b5cd736f9405..275ad68ebb0b4eba6eb925280942bd2243e89faf 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1335,26 +1335,9 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
              if (len > 0)
                {
                  PUT (ch);
-                 if (len > 8)
-                   {
-                     memcpy (to, from, len);
-                     to += len;
-                     from += len;
-                   }
-                 else
-                   {
-                     switch (len)
-                       {
-                       case 8: *to++ = *from++;
-                       case 7: *to++ = *from++;
-                       case 6: *to++ = *from++;
-                       case 5: *to++ = *from++;
-                       case 4: *to++ = *from++;
-                       case 3: *to++ = *from++;
-                       case 2: *to++ = *from++;
-                       case 1: *to++ = *from++;
-                       }
-                   }
+                 memcpy (to, from, len);
+                 to += len;
+                 from += len;
                  if (to >= toend)
                    goto tofull;
                  ch = GET ();