diff options
author | Ben Elliston <bje@au.ibm.com> | 2006-03-10 10:57:18 +0000 |
---|---|---|
committer | Ben Elliston <bje@au.ibm.com> | 2006-03-10 10:57:18 +0000 |
commit | 518051dc53b2899e817f7af54f91928ef47f6da1 (patch) | |
tree | 6e56ea6a43a6a167a90e30d227bac806bffc35dd /gas/app.c | |
parent | a9877905958194058a1ead350a9a3e89d45b4b94 (diff) | |
download | gdb-518051dc53b2899e817f7af54f91928ef47f6da1.zip gdb-518051dc53b2899e817f7af54f91928ef47f6da1.tar.gz gdb-518051dc53b2899e817f7af54f91928ef47f6da1.tar.bz2 |
* app.c (do_scrub_chars): Simplify string handling.
Diffstat (limited to 'gas/app.c')
-rw-r--r-- | gas/app.c | 23 |
1 files changed, 3 insertions, 20 deletions
@@ -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 (); |