[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
This commit is contained in:
Sam Tebbs 2018-11-28 17:08:17 +00:00 committed by Sam Tebbs
parent 345d2d0349
commit 7185a4ebc2
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
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>
PR tree-optimization/88223

View file

@ -12017,7 +12017,7 @@ aarch64_process_target_attr (tree args)
unsigned int num_commas = num_occurences_in_str (',', str_to_check);
/* 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;
while (token)
@ -12029,7 +12029,7 @@ aarch64_process_target_attr (tree args)
return false;
}
token = strtok (NULL, ",");
token = strtok_r (NULL, ",", &str_to_check);
}
if (num_attrs != num_commas + 1)