summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-08-01 14:34:01 +0200
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-08-01 14:34:01 +0200
commit69925c782bf70d267ea14a57d46b5390f5555b8f (patch)
tree391e89863d2118ab5f5828cec9039035165fd77f
parentb05087d9aac2369b2ce19e45441da5b761b36a42 (diff)
downloadmonitoring-plugins-69925c78.tar.gz
check_ssh: fix data type to allow for error checking
-rw-r--r--plugins/check_ssh.c4
1 files 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_
245 245
246 char *output = (char *)calloc(BUFF_SZ + 1, sizeof(char)); 246 char *output = (char *)calloc(BUFF_SZ + 1, sizeof(char));
247 char *buffer = NULL; 247 char *buffer = NULL;
248 size_t recv_ret = 0; 248 ssize_t recv_ret = 0;
249 char *version_control_string = NULL; 249 char *version_control_string = NULL;
250 size_t byte_offset = 0; 250 size_t byte_offset = 0;
251 while ((version_control_string == NULL) && 251 while ((version_control_string == NULL) &&
@@ -283,7 +283,7 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
283 memset(output + byte_offset, 0, BUFF_SZ - byte_offset); 283 memset(output + byte_offset, 0, BUFF_SZ - byte_offset);
284 } 284 }
285 } else { 285 } else {
286 byte_offset += recv_ret; 286 byte_offset += (size_t)recv_ret;
287 } 287 }
288 } 288 }
289 289