mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-13 00:16:37 +00:00
dhcp: fix log level for dhcp server, if not present (#2086)
This commit is contained in:
@@ -41,7 +41,7 @@ func GetDHCPV4ScopeStatistics() ([]DHCPV4Scope, error) {
|
||||
var mibInfo *DHCP_MIB_INFO_V5
|
||||
|
||||
if err := dhcpGetMibInfoV5(&mibInfo); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("dhcpGetMibInfoV5: %w", err)
|
||||
}
|
||||
|
||||
defer dhcpRpcFreeMemory(unsafe.Pointer(mibInfo))
|
||||
@@ -56,7 +56,7 @@ func GetDHCPV4ScopeStatistics() ([]DHCPV4Scope, error) {
|
||||
var superScopeTable *DHCP_SUPER_SCOPE_TABLE
|
||||
|
||||
if err := dhcpGetSuperScopeInfoV4(&superScopeTable); err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("dhcpGetSuperScopeInfoV4: %w", err)
|
||||
} else if superScopeTable == nil {
|
||||
return nil, errors.New("dhcpGetSuperScopeInfoV4 returned nil")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user