Skip to content

Commit ae29373

Browse files
committed
Remove "comment" local temporary
It was being shadowed, any neither use adds much clarity.
1 parent bff4091 commit ae29373

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/goto-programs/string_instrumentation.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,8 @@ void string_instrumentationt::do_format_string_read(
453453
format_ass->make_assertion(is_zero_string(arguments[1]));
454454
format_ass->source_location=target->source_location;
455455
format_ass->source_location.set_property_class("string");
456-
std::string comment("zero-termination of format string of ");
457-
comment += function_name;
458-
format_ass->source_location.set_comment(comment);
456+
format_ass->source_location.set_comment(
457+
"zero-termination of format string of " + function_name);
459458

460459
for(std::size_t i=2; i<arguments.size(); i++)
461460
{
@@ -468,9 +467,8 @@ void string_instrumentationt::do_format_string_read(
468467
goto_programt::targett assertion=dest.add_instruction();
469468
assertion->source_location=target->source_location;
470469
assertion->source_location.set_property_class("string");
471-
std::string comment("zero-termination of string argument of ");
472-
comment += function_name;
473-
assertion->source_location.set_comment(comment);
470+
assertion->source_location.set_comment(
471+
"zero-termination of string argument of " + function_name);
474472

475473
exprt temp(arg);
476474

0 commit comments

Comments
 (0)