[gdb/symtab] Remove dead code in parse_macro_definition
In parse_macro_definition, there's a loop:
...
for (p = body; *p; p++)
if (*p == ' ' || *p == '(')
break;
...
whose post-condition is:
...
gdb_assert (*p == ' ' || *p == '(' || *p == '\0');
...
Consequently, in the following:
...
if (*p == ' ' || *p == '\0')
<BODY1>
else if (*p == '(')
<BODY2>
else
<BODY3>
...
BODY3 is dead code.
Remove it, and get rid of unnecessary indentation by using an early-exit:
....
if (*p == ' ' || *p == '\0')
{
<BODY1>
return;
}
gdb_assert (*p == '(');
<BODY2>
...
Tested on aarch64-linux.
Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
1 file changed