aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-05-10 07:45:11 +0000
committerJan Beulich <jbeulich@novell.com>2005-05-10 07:45:11 +0000
commit360e86f1eb32c6bd7569a9f02e823f499fbee66a (patch)
tree7967e24b236769b7411bbef77f02d1205ec6ee01 /gas/read.c
parent4ca02259f79d4c015774923273623e6698bbe1a4 (diff)
downloadfsf-binutils-gdb-360e86f1eb32c6bd7569a9f02e823f499fbee66a.zip
fsf-binutils-gdb-360e86f1eb32c6bd7569a9f02e823f499fbee66a.tar.gz
fsf-binutils-gdb-360e86f1eb32c6bd7569a9f02e823f499fbee66a.tar.bz2
gas/
2005-05-10 Jan Beulich <jbeulich@novell.com> * read.c (s_macro): Move local variable 'local' to smaller scope. Call sb_kill on it when done.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gas/read.c b/gas/read.c
index 2165edf..fa31f4a 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -2348,7 +2348,6 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
char *file;
unsigned int line;
sb s;
- sb label;
const char *err;
const char *name;
@@ -2358,11 +2357,17 @@ s_macro (int ignore ATTRIBUTE_UNUSED)
while (!is_end_of_line[(unsigned char) *input_line_pointer])
sb_add_char (&s, *input_line_pointer++);
- sb_new (&label);
if (line_label != NULL)
- sb_add_string (&label, S_GET_NAME (line_label));
+ {
+ sb label;
- err = define_macro (0, &s, &label, get_line_sb, file, line, &name);
+ sb_new (&label);
+ sb_add_string (&label, S_GET_NAME (line_label));
+ err = define_macro (0, &s, &label, get_line_sb, file, line, &name);
+ sb_kill (&label);
+ }
+ else
+ err = define_macro (0, &s, NULL, get_line_sb, file, line, &name);
if (err != NULL)
as_bad_where (file, line, err, name);
else