From: Ben Elliston Date: Fri, 10 Mar 2006 10:57:18 +0000 (+0000) Subject: * app.c (do_scrub_chars): Simplify string handling. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=518051dc53b2899e817f7af54f91928ef47f6da1;p=binutils-gdb.git * app.c (do_scrub_chars): Simplify string handling. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 5417f7e021f..ac85baef355 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2006-03-10 Ben Elliston + + * app.c (do_scrub_chars): Simplify string handling. + 2006-03-07 Richard Sandiford Daniel Jacobowitz Zack Weinberg diff --git a/gas/app.c b/gas/app.c index 3ff7f61e210..275ad68ebb0 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 ();