X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_time.c;h=e4bd26d7f7fc24c5cb34eb5836d08e300dbcc07f;hb=782bc207d5697f539beb1fd3359ce81d22e26a54;hp=c38178052d6434b8ba5790520efadd00b3eea4c5;hpb=6fa04c4a4954c34bd212a0f383fd1337d29a6cde;p=nagiosplug.git diff --git a/plugins/check_time.c b/plugins/check_time.c index c381780..e4bd26d 100644 --- a/plugins/check_time.c +++ b/plugins/check_time.c @@ -39,7 +39,7 @@ #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" @@ -93,12 +93,12 @@ main (int argc, char **argv) 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); @@ -209,7 +209,7 @@ process_arguments (int argc, char **argv) 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) @@ -306,7 +306,7 @@ print_usage (void) " [-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); } @@ -316,7 +316,7 @@ print_usage (void) 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);