Skip to content

Commit

Permalink
fixed another wrapped nil error return
Browse files Browse the repository at this point in the history
  • Loading branch information
garmr-ulfr committed Feb 27, 2024
1 parent c40e5d7 commit 9997753
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ func (at *ActionTree) Matches(packet gopacket.Packet) (bool, error) {
// packets.
func (at *ActionTree) Apply(packet gopacket.Packet) ([]gopacket.Packet, error) {
r, err := at.RootAction.Apply(packet)
return r, fmt.Errorf("apply failed: %w", err)
if err != nil {
return r, fmt.Errorf("apply failed: %w", err)
}

return r, nil
}

// ParseActionTree attempts to parse an action tree from its input.
Expand Down

0 comments on commit 9997753

Please sign in to comment.