diff options
author | Mark A. Ziesemer <online@mark.ziesemer.com> | 2022-01-22 08:58:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 15:58:59 +0100 |
commit | 3b252b9ae61b5e5c577ea57f3c6bf00c3bb7517d (patch) | |
tree | ef871a1822e7192875aaf856b48215d113bb7a42 | |
parent | c255656a4c80514dc649e0521dfd64ca923329ce (diff) | |
download | monitoring-plugins-3b252b9ae61b5e5c577ea57f3c6bf00c3bb7517d.tar.gz |
Trivial source code formatting only: Use tabs consistently for source code indentation (whitespace), as per https://github.com/monitoring-plugins/monitoring-plugins/blob/master/CODING . (#1424)
Looks good, thank you very much.
-rw-r--r-- | plugins/check_ping.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 5ea11294..741f732e 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -140,7 +140,7 @@ main (int argc, char **argv) | |||
140 | if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) { | 140 | if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) { |
141 | printf ("%s\n", cmd); | 141 | printf ("%s\n", cmd); |
142 | die (STATE_UNKNOWN, | 142 | die (STATE_UNKNOWN, |
143 | _("CRITICAL - Could not interpret output from ping command\n")); | 143 | _("CRITICAL - Could not interpret output from ping command\n")); |
144 | } | 144 | } |
145 | 145 | ||
146 | if (pl >= cpl || rta >= crta || rta < 0) | 146 | if (pl >= cpl || rta >= crta || rta < 0) |
@@ -554,7 +554,7 @@ error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) | |||
554 | if (warn_text == NULL) | 554 | if (warn_text == NULL) |
555 | warn_text = strdup (_(WARN_DUPLICATES)); | 555 | warn_text = strdup (_(WARN_DUPLICATES)); |
556 | else if (! strstr (warn_text, _(WARN_DUPLICATES)) && | 556 | else if (! strstr (warn_text, _(WARN_DUPLICATES)) && |
557 | xasprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1) | 557 | xasprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1) |
558 | die (STATE_UNKNOWN, _("Unable to realloc warn_text\n")); | 558 | die (STATE_UNKNOWN, _("Unable to realloc warn_text\n")); |
559 | return (STATE_WARNING); | 559 | return (STATE_WARNING); |
560 | } | 560 | } |
@@ -574,7 +574,7 @@ print_help (void) | |||
574 | 574 | ||
575 | printf (_("Use ping to check connection statistics for a remote host.")); | 575 | printf (_("Use ping to check connection statistics for a remote host.")); |
576 | 576 | ||
577 | printf ("\n\n"); | 577 | printf ("\n\n"); |
578 | 578 | ||
579 | print_usage (); | 579 | print_usage (); |
580 | 580 | ||
@@ -584,29 +584,29 @@ print_help (void) | |||
584 | printf (UT_IPv46); | 584 | printf (UT_IPv46); |
585 | 585 | ||
586 | printf (" %s\n", "-H, --hostname=HOST"); | 586 | printf (" %s\n", "-H, --hostname=HOST"); |
587 | printf (" %s\n", _("host to ping")); | 587 | printf (" %s\n", _("host to ping")); |
588 | printf (" %s\n", "-w, --warning=THRESHOLD"); | 588 | printf (" %s\n", "-w, --warning=THRESHOLD"); |
589 | printf (" %s\n", _("warning threshold pair")); | 589 | printf (" %s\n", _("warning threshold pair")); |
590 | printf (" %s\n", "-c, --critical=THRESHOLD"); | 590 | printf (" %s\n", "-c, --critical=THRESHOLD"); |
591 | printf (" %s\n", _("critical threshold pair")); | 591 | printf (" %s\n", _("critical threshold pair")); |
592 | printf (" %s\n", "-p, --packets=INTEGER"); | 592 | printf (" %s\n", "-p, --packets=INTEGER"); |
593 | printf (" %s ", _("number of ICMP ECHO packets to send")); | 593 | printf (" %s ", _("number of ICMP ECHO packets to send")); |
594 | printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS); | 594 | printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS); |
595 | printf (" %s\n", "-L, --link"); | 595 | printf (" %s\n", "-L, --link"); |
596 | printf (" %s\n", _("show HTML in the plugin output (obsoleted by urlize)")); | 596 | printf (" %s\n", _("show HTML in the plugin output (obsoleted by urlize)")); |
597 | 597 | ||
598 | printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); | 598 | printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); |
599 | 599 | ||
600 | printf ("\n"); | 600 | printf ("\n"); |
601 | printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel")); | 601 | printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel")); |
602 | printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the")); | 602 | printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the")); |
603 | printf ("%s\n", _("percentage of packet loss to trigger an alarm state.")); | 603 | printf ("%s\n", _("percentage of packet loss to trigger an alarm state.")); |
604 | 604 | ||
605 | printf ("\n"); | 605 | printf ("\n"); |
606 | printf ("%s\n", _("This plugin uses the ping command to probe the specified host for packet loss")); | 606 | printf ("%s\n", _("This plugin uses the ping command to probe the specified host for packet loss")); |
607 | printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output")); | 607 | printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output")); |
608 | printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in")); | 608 | printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in")); |
609 | printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/")); | 609 | printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/")); |
610 | 610 | ||
611 | printf (UT_SUPPORT); | 611 | printf (UT_SUPPORT); |
612 | } | 612 | } |
@@ -614,7 +614,7 @@ print_help (void) | |||
614 | void | 614 | void |
615 | print_usage (void) | 615 | print_usage (void) |
616 | { | 616 | { |
617 | printf ("%s\n", _("Usage:")); | 617 | printf ("%s\n", _("Usage:")); |
618 | printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname); | 618 | printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname); |
619 | printf (" [-p packets] [-t timeout] [-4|-6]\n"); | 619 | printf (" [-p packets] [-t timeout] [-4|-6]\n"); |
620 | } | 620 | } |