diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-06-05 22:25:21 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-06-25 11:52:29 -0400 |
commit | 4b92e38839652e05e7cdc86487dd18c3a2048339 (patch) | |
tree | 77ce294af20d520c8b1bd7168a022463eccdc378 /gas | |
parent | 7c2c4aa12f4931fb79f94d787ef60e88960bb2a7 (diff) | |
download | fsf-binutils-gdb-4b92e38839652e05e7cdc86487dd18c3a2048339.zip fsf-binutils-gdb-4b92e38839652e05e7cdc86487dd18c3a2048339.tar.gz fsf-binutils-gdb-4b92e38839652e05e7cdc86487dd18c3a2048339.tar.bz2 |
simplify tic54x_set_default_include ()
its only called with an argument of 0, so we might as well remove the code
supporting other values.
gas/ChangeLog:
2016-06-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-tic54x.c (tic54x_set_default_include): remove argument
and simplify accordingly.
(tic54x_include): Adjust.
(tic54x_mlib): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-tic54x.c | 23 |
2 files changed, 16 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index d7246f8..91299ab 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,12 @@ 2016-06-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + * config/tc-tic54x.c (tic54x_set_default_include): remove argument + and simplify accordingly. + (tic54x_include): Adjust. + (tic54x_mlib): Likewise. + +2016-06-25 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + * config/tc-xtensa.c (xtensa_make_property_section): Remove prototype. 2016-06-24 Maciej W. Rozycki <macro@imgtec.com> diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c index 947ba73..409e4a0 100644 --- a/gas/config/tc-tic54x.c +++ b/gas/config/tc-tic54x.c @@ -1855,20 +1855,15 @@ tic54x_clink (int ignored ATTRIBUTE_UNUSED) set to "." instead. */ static void -tic54x_set_default_include (int dot) +tic54x_set_default_include (void) { - const char *dir = "."; - char *tmp = NULL; + char *dir, *tmp = NULL; + const char *curfile; + unsigned lineno; - if (!dot) - { - const char *curfile; - unsigned lineno; - - curfile = as_where (&lineno); - dir = xstrdup (curfile); - tmp = strrchr (dir, '/'); - } + curfile = as_where (&lineno); + dir = xstrdup (curfile); + tmp = strrchr (dir, '/'); if (tmp != NULL) { int len; @@ -1936,7 +1931,7 @@ tic54x_include (int ignored ATTRIBUTE_UNUSED) tic54x_clear_local_labels (0); - tic54x_set_default_include (0); + tic54x_set_default_include (); s_include (0); } @@ -2293,7 +2288,7 @@ tic54x_mlib (int ignore ATTRIBUTE_UNUSED) } demand_empty_rest_of_line (); - tic54x_set_default_include (0); + tic54x_set_default_include (); path = XNEWVEC (char, (unsigned long) len + include_dir_maxlen + 5); for (i = 0; i < include_dir_count; i++) |