diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 74aa3b7c6a03f3b7a6992649026214ee8b477a8e..0c0f2e44f2872e0d4601e683c9b733dd596ecc3c 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
*
*****************************************************************************/
-#define PROGNAME "check_ping"
+const char *progname = "check_ping";
#define REVISION "$Revision$"
#define COPYRIGHT "1999-2001"
#define AUTHOR "Ethan Galstad/Karl DeBisschop"
#define WARN_DUPLICATES "DUPLICATES FOUND! "
int process_arguments (int, char **);
-int call_getopt (int, char **);
int get_threshold (char *, float *, int *);
int validate_arguments (void);
int run_ping (char *);
/* does the host address of number of packets argument come first? */
#ifdef PING_PACKETS_FIRST
- command_line =
- ssprintf (command_line, PING_COMMAND, max_packets, server_address);
+ asprintf (&command_line, PING_COMMAND, max_packets, server_address);
#else
- command_line =
- ssprintf (command_line, PING_COMMAND, server_address, max_packets);
+ asprintf (&command_line, PING_COMMAND, server_address, max_packets);
#endif
/* Set signal handling and alarm */
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (PROGNAME, REVISION);
+ print_revision (progname, REVISION);
exit (STATE_OK);
case 't': /* timeout period */
timeout_interval = atoi (optarg);
" %s -h for detailed help\n"
" %s -V for version information\n",
#endif
- PROGNAME, OPTIONS, PROGNAME, PROGNAME);
+ progname, OPTIONS, progname, progname);
}
void
print_help (void)
{
- print_revision (PROGNAME, REVISION);
+ print_revision (progname, REVISION);
printf
("Copyright (c) %s %s <%s>\n\n%s\n",
COPYRIGHT, AUTHOR, EMAIL, SUMMARY);