diff options
| author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:24:13 +0200 |
|---|---|---|
| committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:24:13 +0200 |
| commit | 51db32cc1dab0cecb62484b048b3bdf27fd871af (patch) | |
| tree | 29af437ce8a66a4fc057bf9bf03dbe55f61c2e90 /plugins | |
| parent | d4539f866288725143aa54a238262fd1784d7929 (diff) | |
| download | monitoring-plugins-51db32cc1dab0cecb62484b048b3bdf27fd871af.tar.gz | |
check_ssh: Use C99 booleans
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/check_ssh.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 8ccbd5a7..4eb746cb 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
| @@ -47,7 +47,7 @@ int port = -1; | |||
| 47 | char *server_name = NULL; | 47 | char *server_name = NULL; |
| 48 | char *remote_version = NULL; | 48 | char *remote_version = NULL; |
| 49 | char *remote_protocol = NULL; | 49 | char *remote_protocol = NULL; |
| 50 | int verbose = FALSE; | 50 | bool verbose = false; |
| 51 | 51 | ||
| 52 | int process_arguments (int, char **); | 52 | int process_arguments (int, char **); |
| 53 | int validate_arguments (void); | 53 | int validate_arguments (void); |
| @@ -57,7 +57,6 @@ void print_usage (void); | |||
| 57 | int ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol); | 57 | int ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol); |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | |||
| 61 | int | 60 | int |
| 62 | main (int argc, char **argv) | 61 | main (int argc, char **argv) |
| 63 | { | 62 | { |
| @@ -133,7 +132,7 @@ process_arguments (int argc, char **argv) | |||
| 133 | print_help (); | 132 | print_help (); |
| 134 | exit (STATE_UNKNOWN); | 133 | exit (STATE_UNKNOWN); |
| 135 | case 'v': /* verbose */ | 134 | case 'v': /* verbose */ |
| 136 | verbose = TRUE; | 135 | verbose = true; |
| 137 | break; | 136 | break; |
| 138 | case 't': /* timeout period */ | 137 | case 't': /* timeout period */ |
| 139 | if (!is_integer (optarg)) | 138 | if (!is_integer (optarg)) |
| @@ -158,7 +157,7 @@ process_arguments (int argc, char **argv) | |||
| 158 | remote_protocol = optarg; | 157 | remote_protocol = optarg; |
| 159 | break; | 158 | break; |
| 160 | case 'H': /* host */ | 159 | case 'H': /* host */ |
| 161 | if (is_host (optarg) == FALSE) | 160 | if (!is_host (optarg)) |
| 162 | usage2 (_("Invalid hostname/address"), optarg); | 161 | usage2 (_("Invalid hostname/address"), optarg); |
| 163 | server_name = optarg; | 162 | server_name = optarg; |
| 164 | break; | 163 | break; |
| @@ -272,7 +271,7 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol | |||
| 272 | printf | 271 | printf |
| 273 | (_("SSH OK - %s (protocol %s) | %s\n"), | 272 | (_("SSH OK - %s (protocol %s) | %s\n"), |
| 274 | ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", | 273 | ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", |
| 275 | FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); | 274 | false, 0, false, 0, true, 0, true, (int)socket_timeout)); |
| 276 | close(sd); | 275 | close(sd); |
| 277 | exit (STATE_OK); | 276 | exit (STATE_OK); |
| 278 | } | 277 | } |
