Commit 7185a4eb by Sam Tebbs Committed by Sam Tebbs

[PATCH][GCC][AARCH64] Replace calls to strtok with strtok_r in aarch64 attribute handling code

2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>

	* config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
	calls to strtok with strtok_r.

From-SVN: r266570
parent 345d2d03
2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
* config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
calls to strtok with strtok_r.
2018-11-28 Richard Biener <rguenther@suse.de> 2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/88223 PR tree-optimization/88223
...@@ -12017,7 +12017,7 @@ aarch64_process_target_attr (tree args) ...@@ -12017,7 +12017,7 @@ aarch64_process_target_attr (tree args)
unsigned int num_commas = num_occurences_in_str (',', str_to_check); unsigned int num_commas = num_occurences_in_str (',', str_to_check);
/* Handle multiple target attributes separated by ','. */ /* Handle multiple target attributes separated by ','. */
char *token = strtok (str_to_check, ","); char *token = strtok_r (str_to_check, ",", &str_to_check);
unsigned int num_attrs = 0; unsigned int num_attrs = 0;
while (token) while (token)
...@@ -12029,7 +12029,7 @@ aarch64_process_target_attr (tree args) ...@@ -12029,7 +12029,7 @@ aarch64_process_target_attr (tree args)
return false; return false;
} }
token = strtok (NULL, ","); token = strtok_r (NULL, ",", &str_to_check);
} }
if (num_attrs != num_commas + 1) if (num_attrs != num_commas + 1)
......
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