Skip to content

Commit

Permalink
improve according to comments at pull-req
Browse files Browse the repository at this point in the history
  • Loading branch information
belphegor-belbel committed Jul 20, 2017
1 parent 98bfd42 commit 91d45a8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/include/apparmor/config_complain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,9 @@ def getProfModeForm(showAll)
"complain" => _("complain"),
}

recListTranslated = []
Builtins.foreach(@recList) do |record|
recListTranslated = Builtins.add(
recListTranslated,
Item(record.params[0], record.params[1],
translation_mapping[record.params[2]])
)
recListTranslated = (@recList || []).map do |record|
Item(record.params[0], record.params[1],
translation_mapping[record.params[2]] || record.params[2])
end

modeForm = Frame(
Expand Down Expand Up @@ -264,7 +260,7 @@ def profileModeConfigForm
1,
""
)
mode = "!unknown!"
mode = ""
Builtins.foreach(@recList) do |record|
if record.params[1] == profile
mode = record.params[2]
Expand Down

0 comments on commit 91d45a8

Please sign in to comment.