summaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2006-03-10 10:57:18 +0000
committerBen Elliston <bje@au.ibm.com>2006-03-10 10:57:18 +0000
commitdee538594398f2d291f4037d804f84ebd3908f70 (patch)
treec3511d39a75d5e16f08aa5772712e3490f0d74ff /gas/app.c
parentd1ec230e8d01c0ca7e3e814bb5d906b7b3e2dd63 (diff)
downloadbinutils-redhat-dee538594398f2d291f4037d804f84ebd3908f70.tar.gz
* app.c (do_scrub_chars): Simplify string handling.
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/gas/app.c b/gas/app.c
index 3ff7f61e21..275ad68ebb 100644
--- 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 ();