Skip to content

Commit

Permalink
[CWS] make MacroEvaluator use the cached fields (#24652)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux authored and alexgallotta committed May 9, 2024
1 parent c1506e1 commit 2df7ade
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/security/secl/compiler/eval/macro.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,5 @@ func (m *Macro) GetFields() []Field {

// GetFields - Returns all the Field that the MacroEvaluator handles
func (m *MacroEvaluator) GetFields() []Field {
fields := make([]Field, len(m.fieldValues))
i := 0
for key := range m.fieldValues {
fields[i] = key
i++
}
return fields
return m.fields
}

0 comments on commit 2df7ade

Please sign in to comment.