diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-25 13:03:27 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-07 23:38:50 +0100 |
commit | 2e9f9ebf7d477956c5cc1779c0fa9c89352d7ab7 (patch) | |
tree | 21bb246cdb9cbdcea064c94bb867901a326151b6 | |
parent | 6428696f31289c2777a34f4c0f761aa038da6284 (diff) | |
download | monitoring-plugins-2e9f9ebf7d477956c5cc1779c0fa9c89352d7ab7.tar.gz |
check_ssh.c: clang-format
-rw-r--r-- | plugins/check_ssh.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index d06af3e7..2ad7af66 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -44,7 +44,7 @@ const char *email = "devel@monitoring-plugins.org"; | |||
44 | # define MSG_DONTWAIT 0 | 44 | # define MSG_DONTWAIT 0 |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #define BUFF_SZ 256 | 47 | #define BUFF_SZ 256 |
48 | 48 | ||
49 | static bool verbose = false; | 49 | static bool verbose = false; |
50 | 50 | ||
@@ -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 = (unsigned int) atoi(optarg); | 154 | socket_timeout = (unsigned int)atoi(optarg); |
155 | } | 155 | } |
156 | break; | 156 | break; |
157 | case '4': | 157 | case '4': |
@@ -248,7 +248,8 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_ | |||
248 | size_t recv_ret = 0; | 248 | size_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) && (recv_ret = recv(socket, output + byte_offset, (unsigned long)( BUFF_SZ - byte_offset), 0) > 0)) { | 251 | while ((version_control_string == NULL) && |
252 | (recv_ret = recv(socket, output + byte_offset, (unsigned long)(BUFF_SZ - byte_offset), 0) > 0)) { | ||
252 | 253 | ||
253 | if (strchr(output, '\n')) { /* we've got at least one full line, start parsing*/ | 254 | if (strchr(output, '\n')) { /* we've got at least one full line, start parsing*/ |
254 | byte_offset = 0; | 255 | byte_offset = 0; |