Skip to content

Commit

Permalink
fix(inputs.snmp): Avoid sending a nil to gosmi's GetEnumBitsFormatted (
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored and asaharn committed Oct 16, 2024
1 parent 858068e commit 080c704
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/snmp/translator_gosmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ func (g *gosmiTranslator) SnmpTable(oid string) (
}

func (g *gosmiTranslator) SnmpFormatEnum(oid string, value interface{}, full bool) (string, error) {
if value == nil {
return "", nil
}

//nolint:dogsled // only need to get the node
_, _, _, _, node, err := snmpTranslateCall(oid)

if err != nil {
return "", err
}
Expand Down

0 comments on commit 080c704

Please sign in to comment.