summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-02-25 11:40:32 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-07 23:38:50 +0100
commitce3eff0908b33140c5a99ee21d1c10405cbe9030 (patch)
treec889545138849fdaff401e8cc91bfe995f143c92 /plugins
parentb48ec884be9ee0026c20575f06a799b2444e284b (diff)
downloadmonitoring-plugins-ce3eff0908b33140c5a99ee21d1c10405cbe9030.tar.gz
check_ssh: no more implicit conversion
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_ssh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index fe8681e2..518950ec 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -151,7 +151,7 @@ process_arguments_wrapper process_arguments(int argc, char **argv) {
151 if (!is_intpos(optarg)) { 151 if (!is_intpos(optarg)) {
152 usage2(_("Timeout interval must be a positive integer"), optarg); 152 usage2(_("Timeout interval must be a positive integer"), optarg);
153 } else { 153 } else {
154 socket_timeout = atoi(optarg); 154 socket_timeout = (unsigned int) atoi(optarg);
155 } 155 }
156 break; 156 break;
157 case '4': 157 case '4':
@@ -240,16 +240,16 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
240 240
241 char *output = (char *)calloc(BUFF_SZ + 1, sizeof(char)); 241 char *output = (char *)calloc(BUFF_SZ + 1, sizeof(char));
242 char *buffer = NULL; 242 char *buffer = NULL;
243 ssize_t recv_ret = 0; 243 size_t recv_ret = 0;
244 char *version_control_string = NULL; 244 char *version_control_string = NULL;
245 ssize_t byte_offset = 0; 245 size_t byte_offset = 0;
246 while ((version_control_string == NULL) && (recv_ret = recv(socket, output + byte_offset, BUFF_SZ - byte_offset, 0) > 0)) { 246 while ((version_control_string == NULL) && (recv_ret = recv(socket, output + byte_offset, (unsigned long)( BUFF_SZ - byte_offset), 0) > 0)) {
247 247
248 if (strchr(output, '\n')) { /* we've got at least one full line, start parsing*/ 248 if (strchr(output, '\n')) { /* we've got at least one full line, start parsing*/
249 byte_offset = 0; 249 byte_offset = 0;
250 250
251 char *index = NULL; 251 char *index = NULL;
252 int len = 0; 252 unsigned long len = 0;
253 while ((index = strchr(output + byte_offset, '\n')) != NULL) { 253 while ((index = strchr(output + byte_offset, '\n')) != NULL) {
254 /*Partition the buffer so that this line is a separate string, 254 /*Partition the buffer so that this line is a separate string,
255 * by replacing the newline with NUL*/ 255 * by replacing the newline with NUL*/