HomeFreeBSD

sysutils/nut: Remove unnecessary validation for bus_num

Description

sysutils/nut: Remove unnecessary validation for bus_num

The libusb_get_bus_number() function serves as a simple accessor for
the bus number of the opaque device struct. Unlike
libusb_get_port_number(), it does not have the ability to convey
errors back to the caller, and a bus number of 0 is a valid value.
Therefore, any validation around bus_num is redundant.

This commit removes the unnecessary validation code related to bus_num.

Signed-off-by: Xin LI <delphij@FreeBSD.org>

PR: 275293
Upstream commit: 4aeb199eb
Upstream Pull Request: https://github.com/networkupstools/nut/pull/2198/

Details

Provenance
delphijAuthored on Nov 24 2023, 3:52 PM
cyCommitted on Nov 24 2023, 4:03 PM
Parents
R11:f183414b25ed: sysutils/nut-devel: Update to the latest networkupstools/nut github commit
Branches
Unknown
Tags
Unknown