[monitoring-plugins] check_ssh: fix data type to allow for error ...
Lorenz Kästle
git at monitoring-plugins.org
Fri Aug 1 14:50:11 CEST 2025
Module: monitoring-plugins
Branch: master
Commit: 69925c782bf70d267ea14a57d46b5390f5555b8f
Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
Date: Fri Aug 1 14:34:01 2025 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=69925c78
check_ssh: fix data type to allow for error checking
---
plugins/check_ssh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 2c76fa84..f93127ce 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -245,7 +245,7 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
char *output = (char *)calloc(BUFF_SZ + 1, sizeof(char));
char *buffer = NULL;
- size_t recv_ret = 0;
+ ssize_t recv_ret = 0;
char *version_control_string = NULL;
size_t byte_offset = 0;
while ((version_control_string == NULL) &&
@@ -283,7 +283,7 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
memset(output + byte_offset, 0, BUFF_SZ - byte_offset);
}
} else {
- byte_offset += recv_ret;
+ byte_offset += (size_t)recv_ret;
}
}
More information about the Commits
mailing list