Commit b4f69040 by Aaron W. LaFramboise Committed by Richard Sandiford

* read-rtl.c (apply_macro_to_string): Replace index with strchr.

From-SVN: r88283
parent 58c8adc1
2004-09-29 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* read-rtl.c (apply_macro_to_string): Replace index with strchr.
2004-09-29 Jakub Jelinek <jakub@redhat.com> 2004-09-29 Jakub Jelinek <jakub@redhat.com>
* tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD * tree.h (enum tree_index): Add TI_VA_LIST_GPR_COUNTER_FIELD
......
...@@ -245,13 +245,13 @@ apply_macro_to_string (const char *string, struct mapping *macro, int value) ...@@ -245,13 +245,13 @@ apply_macro_to_string (const char *string, struct mapping *macro, int value)
return string; return string;
base = p = copy = ASTRDUP (string); base = p = copy = ASTRDUP (string);
while ((start = index (p, '<')) && (end = index (start, '>'))) while ((start = strchr (p, '<')) && (end = strchr (start, '>')))
{ {
p = start + 1; p = start + 1;
/* If there's a "macro:" prefix, check whether the macro name matches. /* If there's a "macro:" prefix, check whether the macro name matches.
Set ATTR to the start of the attribute name. */ Set ATTR to the start of the attribute name. */
attr = index (p, ':'); attr = strchr (p, ':');
if (attr == 0 || attr > end) if (attr == 0 || attr > end)
attr = p; attr = p;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment