diff --git a/plugins/check_time.c b/plugins/check_time.c
index c38178052d6434b8ba5790520efadd00b3eea4c5..e4bd26d7f7fc24c5cb34eb5836d08e300dbcc07f 100644 (file)
--- a/plugins/check_time.c
+++ b/plugins/check_time.c
#include "netutils.h"
#include "utils.h"
-#define PROGNAME "check_time"
+const char *progname = "check_time";
#define REVISION "$Revision$"
#define COPYRIGHT "1999-2002"
#define AUTHOR "Ethan Galstad"
else
result = STATE_UNKNOWN;
terminate (result,
- "TIME UNKNOWN - could not connect to server %s, port %d\n",
- server_address, server_port);
+ "TIME UNKNOWN - could not connect to server %s, port %d\n",
+ server_address, server_port);
}
/* watch for the connection string */
- result = recv (sd, &raw_server_time, sizeof (raw_server_time), 0);
+ result = recv (sd, (void *)&raw_server_time, sizeof (raw_server_time), 0);
/* close the connection */
close (sd);
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (PROGNAME, REVISION);
+ print_revision (progname, REVISION);
exit (STATE_OK);
case 'H': /* hostname */
if (is_host (optarg) == FALSE)
" [-W connect_time] [-C connect_time] [-t timeout]\n"
" %s (-h | --help) for detailed help\n"
" %s (-V | --version) for version information\n",
- PROGNAME, PROGNAME, PROGNAME);
+ progname, 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);