diff -Naur -x '*~' -x '*.orig' nagios-plugins-1.4.14/contrib/check_rbl.c nagios-plugins-1.4.14-contrib-API/contrib/check_rbl.c --- nagios-plugins-1.4.14/contrib/check_rbl.c 2008-11-30 22:23:18.000000000 +0100 +++ nagios-plugins-1.4.14-contrib-API/contrib/check_rbl.c 2009-09-21 00:31:56.000000000 +0200 @@ -17,11 +17,11 @@ #include "config.h" #include "common.h" -#include "utils.h" +#include "netutils.h" #include "popen.h" #include "string.h" -const char progname = "check_rbl"; +const char *progname = "check_rbl"; const char *revision = "$Revision: 970 $"; //const char *copyright = "2000-2003"; //const char *email = "nagiosplug-devel@lists.sourceforge.net"; @@ -58,11 +58,11 @@ /* build the command to run */ if (dns_server) { - command_line=ssprintf(command_line,"%s @%s %s.%s", + command_line=asprintf(&command_line,"%s @%s %s.%s", PATH_TO_DIG,dns_server, query_address_rev, rbl_name); } else { - command_line=ssprintf(command_line,"%s %s.%s", + command_line=asprintf(&command_line,"%s %s.%s", PATH_TO_DIG, query_address_rev, rbl_name); } @@ -118,7 +118,7 @@ while (fgets(input_buffer,MAX_INPUT_BUFFER-1,child_stderr)) { /* If we get anything on STDERR, at least set warning */ - result=error_set(result,STATE_WARNING); + result=max_state(result,STATE_WARNING); printf("%s",input_buffer); if (!strcmp(output,"")) strcpy(output,1+index(input_buffer,':')); @@ -128,7 +128,7 @@ /* close the pipe */ if (spclose(child_process)) { - result=error_set(result,STATE_WARNING); + result=max_state(result,STATE_WARNING); if (!strcmp(output,"")) strcpy(output,"nslookup returned an error status"); } @@ -313,7 +313,7 @@ " -V, --version\n" " Print version information\n\n", DEFAULT_SOCKET_TIMEOUT); - support(); + printf (_(UT_SUPPORT)); } diff -Naur -x '*~' -x '*.orig' nagios-plugins-1.4.14/contrib/check_uptime.c nagios-plugins-1.4.14-contrib-API/contrib/check_uptime.c --- nagios-plugins-1.4.14/contrib/check_uptime.c 2008-11-30 22:23:18.000000000 +0100 +++ nagios-plugins-1.4.14-contrib-API/contrib/check_uptime.c 2009-09-21 00:38:57.000000000 +0200 @@ -23,9 +23,12 @@ #include "config.h" #include "common.h" -#include "utils.h" +#include "netutils.h" #include "popen.h" +const char *progname = "check_uptime"; +void print_usage(void); + int main(int argc, char **argv) { @@ -43,12 +46,7 @@ if(argc != 2){ printf("Incorrect number of arguments supplied\n"); - printf("\n"); - print_revision(argv[0],"$Revision: 6 $"); - printf("Copyright (c) 2000 Teresa Ramanan (tlr@redowl.org)\n"); - printf("\n"); - printf("Usage: %s <host_address>\n",argv[0]); - printf("\n"); + print_usage(); return STATE_UNKNOWN; } @@ -97,3 +95,12 @@ printf("%s%s%s\n",(daytok == NULL)?"":daytok,(daytok == NULL)?"":",",hrmintok); return STATE_OK; } + +void print_usage(void) +{ + print_revision(progname,"$Revision: 1.2 $"); + printf("Copyright (c) 2000 Teresa Ramanan (tlr@redowl.org)\n"); + printf("\n"); + printf("Usage: %s <host_address>\n",progname); + printf("\n"); +}