Commit ce005f35 by Jeff Law Committed by Jeff Law

darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period…

darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period and second_period variables.

	* config/darwin-driver.c (darwin_driver_init): Const-correctness
	fixes for first_period and second_period variables.

From-SVN: r244010
parent 755be849
2017-01-02 Jeff Law <law@redhat.com>
* config/darwin-driver.c (darwin_driver_init): Const-correctness
fixes for first_period and second_period variables.
2017-01-02 Uros Bizjak <ubizjak@gmail.com> 2017-01-02 Uros Bizjak <ubizjak@gmail.com>
PR target/78967 PR target/78967
......
...@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count, ...@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
if (vers_string != NULL) if (vers_string != NULL)
{ {
char *asm_major = NULL; char *asm_major = NULL;
char *first_period = strchr(vers_string, '.'); const char *first_period = strchr(vers_string, '.');
if (first_period != NULL) if (first_period != NULL)
{ {
char *second_period = strchr(first_period+1, '.'); const char *second_period = strchr(first_period+1, '.');
if (second_period != NULL) if (second_period != NULL)
asm_major = xstrndup (vers_string, second_period-vers_string); asm_major = xstrndup (vers_string, second_period-vers_string);
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