Skip to content

Commit fc59e01

Browse files
authored
Adjust ansi_c_entry_point.cpp to match coding standards
1 parent f98c61a commit fc59e01

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/ansi-c/ansi_c_entry_point.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ exprt::operandst build_function_environment(
5151

5252
for(const auto & p : parameters)
5353
{
54-
irep_idt base_name=p.get_base_name();
55-
if(base_name.empty()) base_name="argument#"+i2string(i);
54+
irep_idt base_name=p.get_base_name().empty()?
55+
("argument#"+i2string(i)):p.get_base_name();
5656
irep_idt identifier=id2string(goto_functionst::entry_point())+
5757
"::"+id2string(base_name);
5858

@@ -135,10 +135,12 @@ void record_function_outputs(
135135

136136
for(const auto & p : parameters)
137137
{
138+
if(p.get_identifier().empty())
139+
continue;
140+
138141
irep_idt identifier=p.get_identifier();
139-
if(identifier.empty()) continue;
140142

141-
const symbolt &symbol = symbol_table.lookup(identifier);
143+
const symbolt &symbol=symbol_table.lookup(identifier);
142144

143145
if(symbol.type.id()==ID_pointer)
144146
{
@@ -194,7 +196,8 @@ bool ansi_c_entry_point(
194196
symbol_tablet::symbolst::const_iterator s_it=
195197
symbol_table.symbols.find(it->second);
196198

197-
if(s_it==symbol_table.symbols.end()) continue;
199+
if(s_it==symbol_table.symbols.end())
200+
continue;
198201

199202
if(s_it->second.type.id()==ID_code)
200203
matches.push_back(it->second);

0 commit comments

Comments
 (0)