diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-06-24 16:06:38 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-06-24 16:06:38 +0000 |
commit | 6cbac8b9dd0bc48e87d6e3366d2f64614a099c2d (patch) | |
tree | 3ce45ed959200d0c51eadbfd7ef5b9bcbc42ce42 /bfd/cpu-i960.c | |
parent | cb90e81a8b74a6c9d0d4faf201a4d61c8c0f977c (diff) | |
download | binutils-gdb-6cbac8b9dd0bc48e87d6e3366d2f64614a099c2d.tar.gz |
2001-06-24 H.J. Lu <hjl@gnu.org>
* cpu-i960.c (scan_960_mach): Don't modify const char *. Use
strncasecmp/strcasecmp instead of strncmp/strcmp.
Diffstat (limited to 'bfd/cpu-i960.c')
-rw-r--r-- | bfd/cpu-i960.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bfd/cpu-i960.c b/bfd/cpu-i960.c index 2c8af297f4c..2b7c1225f7b 100644 --- a/bfd/cpu-i960.c +++ b/bfd/cpu-i960.c @@ -33,14 +33,10 @@ scan_960_mach (ap, string) const char *string; { unsigned long machine; - int i; int fail_because_not_80960 = false; - for (i = 0; i < strlen (string); i ++) - string[i] = tolower (string[i]); - /* Look for the string i960 at the front of the string. */ - if (strncmp ("i960", string, 4) == 0) + if (strncasecmp ("i960", string, 4) == 0) { string += 4; @@ -74,9 +70,9 @@ scan_960_mach (ap, string) if (string[0] == 'c' && string[1] == 'o' && string[2] == 'r' && string[3] == 'e' && string[4] == '\0') machine = bfd_mach_i960_core; - else if (strcmp (string, "ka_sa") == 0) + else if (strcasecmp (string, "ka_sa") == 0) machine = bfd_mach_i960_ka_sa; - else if (strcmp (string, "kb_sb") == 0) + else if (strcasecmp (string, "kb_sb") == 0) machine = bfd_mach_i960_kb_sb; else if (string[1] == '\0' || string[2] != '\0') /* rest are 2-char. */ return false; |