Skip to content

Commit

Permalink
clients/upsclient.c: when host is known NULL, report that directly, n…
Browse files Browse the repository at this point in the history
…o need for NUT_STRARG() [networkupstools#2512]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jul 22, 2024
1 parent 94abf13 commit 5806ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/upsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags
ups->fd = -1;

if (!host) {
upslogx(LOG_WARNING, "%s: Host not found: '%s'", __func__, NUT_STRARG(host));
upslogx(LOG_WARNING, "%s: Host not specified", __func__);
ups->upserror = UPSCLI_ERR_NOSUCHHOST;
return -1;
}
Expand Down

0 comments on commit 5806ce0

Please sign in to comment.