Fix usbhid-ups
instant commands that could work without non-trivial args before NUT v2.8.3
#2955
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As raised in https://alioth-lists.debian.net/pipermail/nut-upsuser/2025-May/013964.html mailing list discussion, NUT v2.8.3 refused to command an UPS to shut down, while v2.8.2 was successful (to an extent - a command was at least sent, but the UPS was just beeping). This is a regression due to PR #2860, apparently.
This PR restores use of
0
value being passed as instcmd argument if none was given (the earlier use of NULL could segfault on some systems; now it falls back to an explicit"0"
string).