+2016-04-03 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * config/bfin-parse.y (current_inputline): Remove definition.
+ * config/tc-bfin.c (md_assemble): Simplify use of current_inputline.
+
2016-04-03 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-avr.c (md_parse_option): Use strcasecmp () to compare
md_assemble (char *line)
{
char *toP = 0;
- extern char *current_inputline;
int size, insn_size;
struct bfin_insn *tmp_insn;
size_t len;
static size_t buffer_len = 0;
+ static char *current_inputline;
parse_state state;
len = strlen (line);
if (len + 2 > buffer_len)
{
- if (buffer_len > 0)
- free (current_inputline);
buffer_len = len + 40;
- current_inputline = xmalloc (buffer_len);
+ current_inputline = XRESIZEVEC (char, current_inputline, buffer_len);
}
memcpy (current_inputline, line, len);
current_inputline[len] = ';';