diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 12:10:55 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 12:10:55 +0200 |
commit | 07f9c438f31de7a280e43c4196a32d200ad41fbe (patch) | |
tree | 642bd4478a70665df23b83cb7b48770c3020c570 /plugins/check_ups.c | |
parent | 47cb10013e6935bb6cdf470925ea5a5f74464646 (diff) | |
download | monitoring-plugins-07f9c43.tar.gz |
Fixes for -Wsign-compare
Diffstat (limited to 'plugins/check_ups.c')
-rw-r--r-- | plugins/check_ups.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/check_ups.c b/plugins/check_ups.c index d1ded620..bb91c4ad 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c | |||
@@ -402,7 +402,8 @@ get_ups_variable (const char *varname, char *buf) | |||
402 | 402 | ||
403 | /* create the command string to send to the UPS daemon */ | 403 | /* create the command string to send to the UPS daemon */ |
404 | /* Add LOGOUT to avoid read failure logs */ | 404 | /* Add LOGOUT to avoid read failure logs */ |
405 | if (snprintf (send_buffer, sizeof(send_buffer), "GET VAR %s %s\nLOGOUT\n", ups_name, varname) >= sizeof(send_buffer)) { | 405 | int res = snprintf (send_buffer, sizeof(send_buffer), "GET VAR %s %s\nLOGOUT\n", ups_name, varname); |
406 | if ( (res > 0) && ((size_t)res >= sizeof(send_buffer))) { | ||
406 | printf("%s\n", _("UPS name to long for buffer")); | 407 | printf("%s\n", _("UPS name to long for buffer")); |
407 | return ERROR; | 408 | return ERROR; |
408 | } | 409 | } |