[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2087] nagiosplug/trunk

dermoth at users.sourceforge.net dermoth at users.sourceforge.net
Wed Nov 19 07:45:19 CET 2008


Revision: 2087
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2087&view=rev
Author:   dermoth
Date:     2008-11-19 06:45:18 +0000 (Wed, 19 Nov 2008)

Log Message:
-----------
Bulk EOL cleanup

$ git diff --ignore-space-change|diffstat
 0 files changed

Modified Paths:
--------------
    nagiosplug/trunk/lib/parse_ini.c
    nagiosplug/trunk/lib/utils_base.c
    nagiosplug/trunk/lib/utils_disk.c
    nagiosplug/trunk/plugins/check_apt.c
    nagiosplug/trunk/plugins/check_cluster.c
    nagiosplug/trunk/plugins/check_disk.c
    nagiosplug/trunk/plugins/check_dns.c
    nagiosplug/trunk/plugins/check_dummy.c
    nagiosplug/trunk/plugins/check_game.c
    nagiosplug/trunk/plugins/check_hpjd.c
    nagiosplug/trunk/plugins/check_http.c
    nagiosplug/trunk/plugins/check_ldap.c
    nagiosplug/trunk/plugins/check_mrtg.c
    nagiosplug/trunk/plugins/check_mysql.c
    nagiosplug/trunk/plugins/check_nagios.c
    nagiosplug/trunk/plugins/check_ntp.c
    nagiosplug/trunk/plugins/check_ntp_peer.c
    nagiosplug/trunk/plugins/check_ntp_time.c
    nagiosplug/trunk/plugins/check_nwstat.c
    nagiosplug/trunk/plugins/check_pgsql.c
    nagiosplug/trunk/plugins/check_ping.c
    nagiosplug/trunk/plugins/check_radius.c
    nagiosplug/trunk/plugins/check_smtp.c
    nagiosplug/trunk/plugins/check_snmp.c
    nagiosplug/trunk/plugins/check_ssh.c
    nagiosplug/trunk/plugins/check_swap.c
    nagiosplug/trunk/plugins/check_tcp.c
    nagiosplug/trunk/plugins/check_time.c
    nagiosplug/trunk/plugins/check_ups.c
    nagiosplug/trunk/plugins/netutils.c
    nagiosplug/trunk/plugins/popen.c
    nagiosplug/trunk/plugins/urlize.c
    nagiosplug/trunk/plugins-root/check_dhcp.c
    nagiosplug/trunk/plugins-root/check_icmp.c
    nagiosplug/trunk/plugins-root/pst3.c

Modified: nagiosplug/trunk/lib/parse_ini.c
===================================================================
--- nagiosplug/trunk/lib/parse_ini.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/lib/parse_ini.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -82,7 +82,7 @@
 	} else {
 		i->file=strdup(&(locator[stanza_len+1]));
 	}
-	
+
 	if(i->file==NULL || i->stanza==NULL){
 		die(STATE_UNKNOWN, _("malloc() failed!\n"));
 	}
@@ -110,7 +110,7 @@
 		if(inifile!=stdin) fclose(inifile);
 	}
 	free(i.stanza);
-	return defaults;	
+	return defaults;
 }
 
 /* read_defaults is where the meat of the parsing takes place.
@@ -161,7 +161,7 @@
 			default:
 				switch(stanzastate){
 					/* we never found the start of the first stanza, so
-					 * we're dealing with a config error 
+					 * we're dealing with a config error
 					 */
 					case NOSTANZA:
 						die(STATE_UNKNOWN, _("Config file error"));

Modified: nagiosplug/trunk/lib/utils_base.c
===================================================================
--- nagiosplug/trunk/lib/utils_base.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/lib/utils_base.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -89,7 +89,7 @@
 		set_range_end(temp_range, end);
 	}
 
-	if (temp_range->start_infinity == TRUE || 
+	if (temp_range->start_infinity == TRUE ||
 		temp_range->end_infinity == TRUE ||
 		temp_range->start <= temp_range->end) {
 		return temp_range;
@@ -164,7 +164,7 @@
 {
 	int no = FALSE;
 	int yes = TRUE;
-	
+
 	if (my_range->alert_on == INSIDE) {
 		no = TRUE;
 		yes = FALSE;

Modified: nagiosplug/trunk/lib/utils_disk.c
===================================================================
--- nagiosplug/trunk/lib/utils_disk.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/lib/utils_disk.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -91,7 +91,7 @@
   return next;
 }
 
-  
+
 /* returns a pointer to the struct found in the list */
 struct parameter_list *
 np_find_parameter(struct parameter_list *list, const char *name)
@@ -101,7 +101,7 @@
     if (! strcmp(temp_list->name, name))
         return temp_list;
   }
-        
+
   return NULL;
 }
 
@@ -126,7 +126,7 @@
       if (! best_match) {
         for (me = mount_list; me; me = me->me_next) {
           size_t len = strlen (me->me_mountdir);
-          if ((exact == FALSE && (best_match_len <= len && len <= name_len && 
+          if ((exact == FALSE && (best_match_len <= len && len <= name_len &&
              (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0)))
              || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0))
           {
@@ -175,7 +175,7 @@
 }
 
 int
-np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) 
+np_regex_match_mount_entry (struct mount_entry* me, regex_t* re)
 {
   if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 ||
       regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {

Modified: nagiosplug/trunk/plugins/check_apt.c
===================================================================
--- nagiosplug/trunk/plugins/check_apt.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_apt.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -116,7 +116,7 @@
 		result = max_state(result, STATE_OK);
 	}
 
-	printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s\n"), 
+	printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s\n"),
 	       state_text(result),
 	       packages_available,
 	       (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade",
@@ -305,7 +305,7 @@
 	}
 	regfree(&ireg);
 	regfree(&sreg);
-	if(do_exclude!=NULL) regfree(&ereg); 
+	if(do_exclude!=NULL) regfree(&ereg);
 	free(cmdline);
 	return result;
 }
@@ -364,7 +364,7 @@
 		sprintf((char*)(re+strlen(re)-2), "|%s) ", next);
 	}
 
-	return re;	
+	return re;
 }
 
 char* construct_cmdline(upgrade_type u, const char *opts){

Modified: nagiosplug/trunk/plugins/check_cluster.c
===================================================================
--- nagiosplug/trunk/plugins/check_cluster.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_cluster.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -124,8 +124,8 @@
 		        }
 	        }
         }
-	
 
+
 	/* return the status of the cluster */
 	if(check_type==CHECK_SERVICES){
 		return_code=get_status(total_services_warning+total_services_unknown+total_services_critical, thresholds);
@@ -149,7 +149,7 @@
 int process_arguments(int argc, char **argv){
 	int c;
 	int option=0;
-	static struct option longopts[]={ 
+	static struct option longopts[]={
 		{"data",     required_argument,0,'d'},
 		{"warning",  required_argument,0,'w'},
 		{"critical", required_argument,0,'c'},

Modified: nagiosplug/trunk/plugins/check_disk.c
===================================================================
--- nagiosplug/trunk/plugins/check_disk.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_disk.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -198,7 +198,7 @@
   /* If a list of paths has not been selected, find entire
      mount list and create list of paths
    */
-  if (path_selected == FALSE) { 
+  if (path_selected == FALSE) {
     for (me = mount_list; me; me = me->me_next) {
       if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) {
         path = np_add_parameter(&path_select_list, me->me_mountdir);
@@ -293,8 +293,8 @@
       /* Skip excluded fstypes */
       } else if (fs_exclude_list && np_find_name (fs_exclude_list, me->me_type)) {
         continue;
-      /* Skip excluded fs's */  
-      } else if (dp_exclude_list && 
+      /* Skip excluded fs's */
+      } else if (dp_exclude_list &&
                (np_find_name (dp_exclude_list, me->me_devname) ||
                 np_find_name (dp_exclude_list, me->me_mountdir))) {
         continue;
@@ -327,7 +327,7 @@
       dfree_inodes_percent = 100 - dused_inodes_percent;
 
       if (verbose >= 3) {
-        printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%llu mult=%llu\n", 
+        printf ("For %s, used_pct=%g free_pct=%g used_units=%g free_units=%g total_units=%g used_inodes_pct=%g free_inodes_pct=%g fsp.fsu_blocksize=%llu mult=%llu\n",
           me->me_mountdir, dused_pct, dfree_pct, dused_units, dfree_units, dtotal_units, dused_inodes_percent, dfree_inodes_percent, fsp.fsu_blocksize, mult);
       }
 
@@ -430,7 +430,7 @@
   double pct = -1;
   /* I don't understand the below, but it is taken from coreutils' df */
   /* Seems to be calculating pct, in the best possible way */
-  if (value <= TYPE_MAXIMUM(uintmax_t) / 100 
+  if (value <= TYPE_MAXIMUM(uintmax_t) / 100
     && total != 0) {
     uintmax_t u100 = value * 100;
     pct = u100 / total + (u100 % total != 0);
@@ -546,7 +546,7 @@
       }
       break;
 
-    /* Awful mistake where the range values do not make sense. Normally, 
+    /* Awful mistake where the range values do not make sense. Normally,
        you alert if the value is within the range, but since we are using
        freespace, we have to alert if outside the range. Thus we artifically
        force @ at the beginning of the range, so that it is backwards compatible
@@ -620,10 +620,10 @@
     case 'L':
       stat_remote_fs = 1;
     case 'l':
-      show_local_fs = 1;      
+      show_local_fs = 1;
       break;
     case 'p':                 /* select path */
-      if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent || 
+      if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent ||
              crit_freespace_percent || warn_usedspace_units || crit_usedspace_units ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
@@ -714,7 +714,7 @@
     case 'R':
       cflags |= REG_ICASE;
     case 'r':
-      if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent || 
+      if (! (warn_freespace_units || crit_freespace_units || warn_freespace_percent ||
              crit_freespace_percent || warn_usedspace_units || crit_usedspace_units ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
@@ -760,7 +760,7 @@
        if (path_selected == FALSE) {
          struct parameter_list *path;
          for (me = mount_list; me; me = me->me_next) {
-           if (! (path = np_find_parameter(path_select_list, me->me_mountdir))) 
+           if (! (path = np_find_parameter(path_select_list, me->me_mountdir)))
              path = np_add_parameter(&path_select_list, me->me_mountdir);
            path->best_match = me;
            path->group = group;
@@ -819,7 +819,7 @@
 
 
 void
-print_path (const char *mypath) 
+print_path (const char *mypath)
 {
   if (mypath == NULL)
     printf ("\n");
@@ -829,7 +829,7 @@
 
 
 void
-set_all_thresholds (struct parameter_list *path) 
+set_all_thresholds (struct parameter_list *path)
 {
     if (path->freespace_units != NULL) free(path->freespace_units);
     set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units);

Modified: nagiosplug/trunk/plugins/check_dns.c
===================================================================
--- nagiosplug/trunk/plugins/check_dns.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_dns.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -123,7 +123,7 @@
 
   /* scan stdout */
   for(i = 0; i < chld_out.lines; i++) {
-    if (addresses == NULL)  
+    if (addresses == NULL)
       addresses = malloc(sizeof(*addresses)*10);
     else if (!(n_addresses % 10))
       addresses = realloc(addresses,sizeof(*addresses) * (n_addresses + 10));
@@ -289,7 +289,7 @@
             strstr (input_buffer, ": REFUSED")))
     die (STATE_CRITICAL, _("Connection to DNS %s was refused\n"), dns_server);
 
-  /* Query refused (usually by an ACL in the namserver) */ 
+  /* Query refused (usually by an ACL in the namserver) */
   else if (strstr (input_buffer, "Query refused"))
     die (STATE_CRITICAL, _("Query was refused by DNS server at %s\n"), dns_server);
 

Modified: nagiosplug/trunk/plugins/check_dummy.c
===================================================================
--- nagiosplug/trunk/plugins/check_dummy.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_dummy.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -87,7 +87,7 @@
     return STATE_UNKNOWN;
   }
 
-  if (argc >= 3) 
+  if (argc >= 3)
     printf (": %s", argv[2]);
 
   printf("\n");

Modified: nagiosplug/trunk/plugins/check_game.c
===================================================================
--- nagiosplug/trunk/plugins/check_game.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_game.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -105,7 +105,7 @@
   /* was thinking about running qstat without any options, capturing the
      -default line, parsing it & making an array of all know server types
      but thought this would be too much hassle considering this is a tool
-     for intelligent sysadmins (ha). Could put a static array of known 
+     for intelligent sysadmins (ha). Could put a static array of known
      server types in a header file but then we'd be limiting ourselves
 
      In the end, I figured I'd simply let an error occur & then trap it
@@ -139,10 +139,10 @@
     result = STATE_CRITICAL;
   }
   else {
-    printf ("OK: %s/%s %s (%s), Ping: %s ms|%s %s\n", 
+    printf ("OK: %s/%s %s (%s), Ping: %s ms|%s %s\n",
             ret[qstat_game_players],
             ret[qstat_game_players_max],
-            ret[qstat_game_field], 
+            ret[qstat_game_field],
             ret[qstat_map_field],
             ret[qstat_ping_field],
             perfdata ("players", atol(ret[qstat_game_players]), "",
@@ -345,7 +345,7 @@
  * Test Cases:
  *
  * ./check_game --players 7 -p 8 --map 5 qs 67.20.190.61 26000
- * 
+ *
  * qstat -raw , -qs 67.20.190.61
  *  ==> QS,67.20.190.61,Nightmare.fintek.ca,67.20.190.61:26000,3,e2m1,6,0,83,0
  *

Modified: nagiosplug/trunk/plugins/check_hpjd.c
===================================================================
--- nagiosplug/trunk/plugins/check_hpjd.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_hpjd.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -123,7 +123,7 @@
 		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
 
 	/* get the command to run */
-	sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, community, 
+	sprintf (command_line, "%s -OQa -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, community,
 									address, query_string);
 
 	/* run the command */
@@ -198,7 +198,7 @@
 				strcpy (display_message, temp_buffer + 1);
 				break;
 			default:										/* fold multiline message */
-				strncat (display_message, input_buffer, 
+				strncat (display_message, input_buffer,
 						sizeof (display_message) - strlen (display_message) - 1);
 			}
 
@@ -218,7 +218,7 @@
 		sprintf (errmsg, "%s", input_buffer );
 
 	}
-	
+
 	/* close stderr */
 	(void) fclose (child_stderr);
 
@@ -232,7 +232,7 @@
 		/* might not be the problem, but most likely is. */
 		result = STATE_UNKNOWN ;
 		asprintf (&errmsg, "%s : Timeout from host %s\n", errmsg, address );
-		 
+
 	}
 
 	/* if we had no read errors, check the printer status results... */
@@ -326,7 +326,7 @@
 	if (argc < 2)
 		return ERROR;
 
-	
+
 	while (1) {
 		c = getopt_long (argc, argv, "+hVH:C:", longopts, &option);
 
@@ -365,7 +365,7 @@
 			usage2 (_("Invalid hostname/address"), argv[c]);
 		}
 	}
-	
+
 	if (community == NULL) {
 		if (argv[c] != NULL )
 			community = argv[c];

Modified: nagiosplug/trunk/plugins/check_http.c
===================================================================
--- nagiosplug/trunk/plugins/check_http.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_http.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -154,7 +154,7 @@
     usage4 (_("Could not parse arguments"));
 
   if (display_html == TRUE)
-    printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">", 
+    printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
       use_ssl ? "https" : "http", host_name ? host_name : server_address,
       server_port, server_url);
 
@@ -314,7 +314,7 @@
       if (!strcmp (optarg, "critical"))
         onredirect = STATE_CRITICAL;
       if (verbose)
-        printf(_("option f:%d \n"), onredirect);  
+        printf(_("option f:%d \n"), onredirect);
       break;
     /* Note: H, I, and u must be malloc'd or will fail on redirects */
     case 'H': /* Host Name (virtual host) */
@@ -417,7 +417,7 @@
           exit (STATE_WARNING);
         } else
           max_page_len = atoi(tmp);
-      } else 
+      } else
         min_page_len = atoi (optarg);
       break;
       }
@@ -556,7 +556,7 @@
     if (tm.tm_mon < 0 || tm.tm_mday < 1 || tm.tm_mday > 31)
       return 0;
 
-    /* 
+    /*
     This is actually wrong: we need to subtract the local timezone
     offset from GMT from this value.  But, that's ok in this usage,
     because we only comparing these two GMT dates against each other,
@@ -990,7 +990,7 @@
       elapsed_time = (double)microsec / 1.0e6;
       die (onredirect,
            _(" - %s - %.3f second response time %s|%s %s\n"),
-           status_line, elapsed_time, 
+           status_line, elapsed_time,
            (display_html ? "</A>" : ""),
            perfd_time (elapsed_time), perfd_size (pagesize));
     } /* end if (http_status >= 300) */
@@ -1006,7 +1006,7 @@
   elapsed_time = (double)microsec / 1.0e6;
   asprintf (&msg,
             _(" - %s - %.3f second response time %s|%s %s\n"),
-            status_line, elapsed_time, 
+            status_line, elapsed_time,
             (display_html ? "</A>" : ""),
             perfd_time (elapsed_time), perfd_size (pagesize));
   if (check_critical_time == TRUE && elapsed_time > critical_time)
@@ -1043,9 +1043,9 @@
       exit (STATE_OK);
     }
     else if ((errcode == REG_NOMATCH && invert_regex == 0) || (errcode == 0 && invert_regex == 1)) {
-      if (invert_regex == 0) 
+      if (invert_regex == 0)
         msg = strdup(_("pattern not found"));
-      else 
+      else
         msg = strdup(_("pattern found"));
       printf (("%s - %s%s|%s %s\n"),
         _("HTTP CRITICAL"),
@@ -1118,7 +1118,7 @@
     if (i == 0) {
       pos += (size_t) strcspn (pos, "\r\n");
       pos += (size_t) strspn (pos, "\r\n");
-      if (strlen(pos) == 0) 
+      if (strlen(pos) == 0)
         die (STATE_UNKNOWN,
              _("HTTP UNKNOWN - Could not find redirect location - %s%s\n"),
              status_line, (display_html ? "</A>" : ""));
@@ -1151,7 +1151,7 @@
     }
 
     /* URI_HTTP URI_HOST URI_PATH */
-    else if (sscanf (pos, HD2, type, addr, url) == 3 ) { 
+    else if (sscanf (pos, HD2, type, addr, url) == 3 ) {
       url = prepend_slash (url);
       use_ssl = server_type_check (type);
       i = server_port_check (use_ssl);
@@ -1181,7 +1181,7 @@
       i = server_port;
       strcpy (type, server_type);
       strcpy (addr, host_name ? host_name : server_address);
-    }           
+    }
 
     else {
       die (STATE_UNKNOWN,

Modified: nagiosplug/trunk/plugins/check_ldap.c
===================================================================
--- nagiosplug/trunk/plugins/check_ldap.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ldap.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -87,16 +87,16 @@
 	LDAPMessage *result;
 
 	/* should be 	int result = STATE_UNKNOWN; */
-	
+
 	int status = STATE_UNKNOWN;
 	long microsec;
 	double elapsed_time;
-	
+
 	/* for ldap tls */
-	
- 	int tls; 
- 	int version=3;
 
+	int tls;
+	int version=3;
+
 	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	textdomain (PACKAGE);
@@ -129,7 +129,7 @@
 		printf ("Could not connect to the server at port %i\n", ld_port);
 		return STATE_CRITICAL;
 	}
-#else	
+#else
 	if (!(ld = ldap_open (ld_host, ld_port))) {
 		if (verbose)
 			ldap_perror(ld, "ldap_open");
@@ -137,7 +137,7 @@
 		return STATE_CRITICAL;
 	}
 #endif /* HAVE_LDAP_INIT */
-	
+
 #ifdef HAVE_LDAP_SET_OPTION
 	/* set ldap options */
 	if (ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &ld_protocol) !=
@@ -152,7 +152,7 @@
 #if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS)
 		/* ldaps: set option tls */
 		tls = LDAP_OPT_X_TLS_HARD;
-		
+
 		if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS)
 		{
 			if (verbose)
@@ -179,7 +179,7 @@
 		/* call start_tls */
 		if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)
 		{
-			if (verbose) 
+			if (verbose)
 				ldap_perror(ld, "ldap_start_tls");
 			printf (_("Could not init startTLS at port %i!\n"), ld_port);
 			return STATE_CRITICAL;
@@ -189,7 +189,7 @@
 		return STATE_CRITICAL;
 #endif /* HAVE_LDAP_START_TLS_S */
 	}
-	
+
 	/* bind to the ldap server */
 	if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) !=
 			LDAP_SUCCESS) {

Modified: nagiosplug/trunk/plugins/check_mrtg.c
===================================================================
--- nagiosplug/trunk/plugins/check_mrtg.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_mrtg.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -380,7 +380,7 @@
 
 
 
-/* original command line: 
+/* original command line:
 	 <log_file> <expire_minutes> <AVG|MAX> <variable> <vwl> <vcl> <label> [units] */
 
 void

Modified: nagiosplug/trunk/plugins/check_mysql.c
===================================================================
--- nagiosplug/trunk/plugins/check_mysql.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_mysql.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -71,9 +71,9 @@
 	MYSQL mysql;
 	MYSQL_RES *res;
 	MYSQL_ROW row;
-	
+
 	/* should be status */
-	
+
 	char *result = NULL;
 	char *error = NULL;
 	char slaveresult[SLAVERESULTSIZE];
@@ -186,7 +186,7 @@
 				mysql_close (&mysql);
 				die (STATE_CRITICAL, "Slave status unavailable\n");
 			}
-			
+
 			snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], row[seconds_behind_field]);
 			if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) {
 				mysql_free_result (res);

Modified: nagiosplug/trunk/plugins/check_nagios.c
===================================================================
--- nagiosplug/trunk/plugins/check_nagios.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_nagios.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -187,8 +187,8 @@
 	printf (ngettext ("%d process", "%d processes", proc_entries), proc_entries);
 	printf (", ");
 	printf (
-	  ngettext ("status log updated %d second ago", 
-	    "status log updated %d seconds ago", 
+	  ngettext ("status log updated %d second ago",
+	    "status log updated %d seconds ago",
 	    (int) (current_time - latest_entry_time) ),
 	    (int) (current_time - latest_entry_time) );
 	printf ("\n");

Modified: nagiosplug/trunk/plugins/check_ntp.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ntp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -80,7 +80,7 @@
 
 /* this structure holds data about results from querying offset from a peer */
 typedef struct {
-	time_t waiting;         /* ts set when we started waiting for a response */ 
+	time_t waiting;         /* ts set when we started waiting for a response */
 	int num_responses;      /* number of successfully recieved responses */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
@@ -150,7 +150,7 @@
  they are divided into halves, each being a 16-bit int in network byte order:
  - the first 16 bits are an int on the left side of a decimal point.
  - the second 16 bits represent a fraction n/(2^16)
- likewise for the 64-bit "fixed point" numbers with everything doubled :) 
+ likewise for the 64-bit "fixed point" numbers with everything doubled :)
  **/
 
 /* macros to access the left/right 16 bits of a 32-bit ntp "fixed point"
@@ -265,7 +265,7 @@
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 		peer=(ntp_assoc_status_pair*)p->data;
 		for(i=0;i<numpeers;i++){
-			printf("\tpeer id %.2x status %.2x", 
+			printf("\tpeer id %.2x status %.2x",
 			       ntohs(peer[i].assoc), ntohs(peer[i].status));
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
@@ -353,7 +353,7 @@
 
 /* do everything we need to get the total average offset
  * - we use a certain amount of parallelization with poll() to ensure
- *   we don't waste time sitting around waiting for single packets. 
+ *   we don't waste time sitting around waiting for single packets.
  * - we also "manually" handle resolving host names and connecting, because
  *   we have to do it in a way that our lazy macros don't handle currently :( */
 double offset_request(const char *host, int *status){
@@ -667,7 +667,7 @@
 		{0, 0, 0, 0}
 	};
 
-	
+
 	if (argc < 2)
 		usage ("\n");
 

Modified: nagiosplug/trunk/plugins/check_ntp_peer.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp_peer.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ntp_peer.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -162,7 +162,7 @@
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 		peer=(ntp_assoc_status_pair*)p->data;
 		for(i=0;i<numpeers;i++){
-			printf("\tpeer id %.2x status %.2x", 
+			printf("\tpeer id %.2x status %.2x",
 			       ntohs(peer[i].assoc), ntohs(peer[i].status));
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
@@ -477,7 +477,7 @@
 		{0, 0, 0, 0}
 	};
 
-	
+
 	if (argc < 2)
 		usage ("\n");
 

Modified: nagiosplug/trunk/plugins/check_ntp_time.c
===================================================================
--- nagiosplug/trunk/plugins/check_ntp_time.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ntp_time.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -81,7 +81,7 @@
 
 /* this structure holds data about results from querying offset from a peer */
 typedef struct {
-	time_t waiting;         /* ts set when we started waiting for a response */ 
+	time_t waiting;         /* ts set when we started waiting for a response */
 	int num_responses;      /* number of successfully recieved responses */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
@@ -132,7 +132,7 @@
  they are divided into halves, each being a 16-bit int in network byte order:
  - the first 16 bits are an int on the left side of a decimal point.
  - the second 16 bits represent a fraction n/(2^16)
- likewise for the 64-bit "fixed point" numbers with everything doubled :) 
+ likewise for the 64-bit "fixed point" numbers with everything doubled :)
  **/
 
 /* macros to access the left/right 16 bits of a 32-bit ntp "fixed point"
@@ -299,7 +299,7 @@
 
 /* do everything we need to get the total average offset
  * - we use a certain amount of parallelization with poll() to ensure
- *   we don't waste time sitting around waiting for single packets. 
+ *   we don't waste time sitting around waiting for single packets.
  * - we also "manually" handle resolving host names and connecting, because
  *   we have to do it in a way that our lazy macros don't handle currently :( */
 double offset_request(const char *host, int *status){
@@ -461,7 +461,7 @@
 		{0, 0, 0, 0}
 	};
 
-	
+
 	if (argc < 2)
 		usage ("\n");
 

Modified: nagiosplug/trunk/plugins/check_nwstat.c
===================================================================
--- nagiosplug/trunk/plugins/check_nwstat.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_nwstat.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -203,7 +203,7 @@
 
 	/* check CPU load */
 	if (vars_to_check==LOAD1 || vars_to_check==LOAD5 || vars_to_check==LOAD15) {
-			
+
 		switch(vars_to_check) {
 		case LOAD1:
 			temp_buffer = strdup ("1");
@@ -249,7 +249,7 @@
 			  temp_buffer,
 			  utilization,
 			  warning_value,
-			  critical_value);	
+			  critical_value);
 
 		/* check number of user connections */
 	} else if (vars_to_check==CONNS) {
@@ -457,7 +457,7 @@
 				 critical_value);
 		}
 
-		
+
 		/* check % free space on volume */
 	} else if (vars_to_check==VPF) {
 
@@ -568,12 +568,12 @@
 				result=STATE_WARNING;
 				asprintf (&output_message,_("Warning - NRM Status is suspect!"));
 			}
-			
+
 			asprintf (&output_message,_("OK - NRM Status is good!"));
 		}
 
-		
 
+
 		/* check packet receive buffers */
 	} else if (vars_to_check==UPRB || vars_to_check==PUPRB) {
 
@@ -827,8 +827,8 @@
 				open_files,
 				warning_value,
 				critical_value);
-			
 
+
 		/* check # of abended threads (Netware > 5.x only) */
 	} else if (vars_to_check==ABENDS) {
 
@@ -914,7 +914,7 @@
 
 
 
-		
+
 		/* check LRU sitting time in secondss */
 	} else if (vars_to_check==LRUS) {
 
@@ -977,7 +977,7 @@
 				total_cache_buffers,
 				warning_value,
 				critical_value);
-		
+
 	} else if (vars_to_check==DSVER) {
 
 		close(sd);
@@ -1005,7 +1005,7 @@
 
 		recv_buffer[sizeof(recv_buffer)-1]=0;
 		recv_buffer[strlen(recv_buffer)-1]=0;
-	
+
 		asprintf (&output_message,_("Up %s"),recv_buffer);
 
 	} else if (vars_to_check==NLM) {
@@ -1024,7 +1024,7 @@
 		} else {
 			result=STATE_CRITICAL;
 			asprintf (&output_message,_("Module %s is not loaded"),nlm_name);
-		
+
 			}
 	} else if (vars_to_check==NRMP) {
 
@@ -1313,7 +1313,7 @@
 
 	int option = 0;
 	static struct option longopts[] =
-		{ 
+		{
 			{"port",     required_argument,0,'p'},
 			{"timeout",  required_argument,0,'t'},
 			{"critical", required_argument,0,'c'},
@@ -1498,7 +1498,7 @@
 					nrmm_name = strdup (optarg+4);
 					if (!strcmp(nrmm_name,""))
 						nrmm_name = strdup ("AVAILABLE_CACHE_MEMORY");
-	
+
 				}
 
 				else if (strncmp(optarg,"NRMS",4)==0) {
@@ -1506,7 +1506,7 @@
 					nrms_name = strdup (optarg+4);
 					if (!strcmp(nrms_name,""))
 						nrms_name = strdup ("USED_SWAP_SPACE");
-	
+
 				}
 
 				else if (strncmp(optarg,"NSS1",4)==0) {
@@ -1514,7 +1514,7 @@
 					nss1_name = strdup (optarg+4);
 					if (!strcmp(nss1_name,""))
 						nss1_name = strdup ("CURRENTBUFFERCACHESIZE");
-	
+
 				}
 
 				else if (strncmp(optarg,"NSS2",4)==0) {
@@ -1522,7 +1522,7 @@
 					nss2_name = strdup (optarg+4);
 					if (!strcmp(nss2_name,""))
 						nss2_name = strdup ("CACHEHITS");
-	
+
 				}
 
 				else if (strncmp(optarg,"NSS3",4)==0) {
@@ -1530,7 +1530,7 @@
 					nss3_name = strdup (optarg+4);
 					if (!strcmp(nss3_name,""))
 						nss3_name = strdup ("CACHEGITPERCENT");
-	
+
 				}
 
 				else if (strncmp(optarg,"NSS4",4)==0) {
@@ -1538,7 +1538,7 @@
 					nss4_name = strdup (optarg+4);
 					if (!strcmp(nss4_name,""))
 						nss4_name = strdup ("CURRENTOPENCOUNT");
-	
+
 				}
 
 				else if (strncmp(optarg,"NSS5",4)==0) {
@@ -1546,7 +1546,7 @@
 					nss5_name = strdup (optarg+4);
 					if (!strcmp(nss5_name,""))
 						nss5_name = strdup ("CACHEMISSES");
-	
+
 				}
 
 
@@ -1555,7 +1555,7 @@
 					nss6_name = strdup (optarg+4);
 					if (!strcmp(nss6_name,""))
 						nss6_name = strdup ("PENDINGWORKSCOUNT");
-	
+
 				}
 
 
@@ -1564,7 +1564,7 @@
 					nss7_name = strdup (optarg+4);
 					if (!strcmp(nss7_name,""))
 						nss7_name = strdup ("CACHESIZE");
-	
+
 				}
 
 

Modified: nagiosplug/trunk/plugins/check_pgsql.c
===================================================================
--- nagiosplug/trunk/plugins/check_pgsql.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_pgsql.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -186,7 +186,7 @@
 		status = STATE_OK;
 	}
 	PQfinish (conn);
-	printf (_(" %s - database %s (%d sec.)|%s\n"), 
+	printf (_(" %s - database %s (%d sec.)|%s\n"),
 	        state_text(status), dbName, elapsed_time,
 	        fperfdata("time", elapsed_time, "s",
 	                 (int)twarn, twarn, (int)tcrit, tcrit, TRUE, 0, FALSE,0));
@@ -355,7 +355,7 @@
 
 /**
 
-the tango program should eventually create an entity here based on the 
+the tango program should eventually create an entity here based on the
 function prototype
 
 @@-
@@ -389,7 +389,7 @@
 
 /******************************************************************************
 @@-
-</sect2> 
+</sect2>
 </sect1>
 </article>
 -@@

Modified: nagiosplug/trunk/plugins/check_ping.c
===================================================================
--- nagiosplug/trunk/plugins/check_ping.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ping.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -112,7 +112,7 @@
 #endif
 
 	for (i = 0 ; i < n_addresses ; i++) {
-		
+
 #ifdef PING6_COMMAND
 		if (address_family != AF_INET && is_inet6_addr(addresses[i]))
 			rawcmd = strdup(PING6_COMMAND);
@@ -150,8 +150,8 @@
 		else if (pl >= wpl || rta >= wrta)
 			this_result = STATE_WARNING;
 		else if (pl >= 0 && rta >= 0)
-			this_result = max_state (STATE_OK, this_result);	
-	
+			this_result = max_state (STATE_OK, this_result);
+
 		if (n_addresses > 1 && this_result != STATE_UNKNOWN)
 			die (STATE_OK, "%s is alive\n", addresses[i]);
 
@@ -370,7 +370,7 @@
 		return OK;
 	else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2)
 		return OK;
-	else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) 
+	else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1)
 		return OK;
 
 	usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg);

Modified: nagiosplug/trunk/plugins/check_radius.c
===================================================================
--- nagiosplug/trunk/plugins/check_radius.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_radius.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -169,8 +169,8 @@
 				(nasid==NULL || my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
 		die (STATE_UNKNOWN, _("Out of Memory?"));
 
-	/* 
-	 * Fill in NAS-IP-Address 
+	/*
+	 * Fill in NAS-IP-Address
 	 */
 
 	if ((client_id = my_rc_own_ipaddress ()) == 0)

Modified: nagiosplug/trunk/plugins/check_smtp.c
===================================================================
--- nagiosplug/trunk/plugins/check_smtp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_smtp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -168,7 +168,7 @@
 
 	if (verbose && smtp_use_dummycmd)
 		printf ("FROM CMD: %s", cmd_str);
-	
+
 	/* initialize alarm signal handling */
 	(void) signal (SIGALRM, socket_timeout_alarm_handler);
 
@@ -285,7 +285,7 @@
 #  endif /* USE_OPENSSL */
 		}
 #endif
-				
+
 		/* sendmail will syslog a "NOQUEUE" error if session does not attempt
 		 * to do something useful. This can be prevented by giving a command
 		 * even if syntax is illegal (MAIL requires a FROM:<...> argument)
@@ -746,7 +746,7 @@
 }
 
 
-int 
+int
 my_close (void)
 {
 #ifdef HAVE_SSL

Modified: nagiosplug/trunk/plugins/check_snmp.c
===================================================================
--- nagiosplug/trunk/plugins/check_snmp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_snmp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -199,11 +199,11 @@
 			PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
 			"[authpriv]", server_address, port, oid);
 	}
-	
+
 	if (verbose)
 		printf ("%s\n", command_line);
-	
 
+
 	/* run the command */
 	child_process = spopen (command_line);
 	if (child_process == NULL) {
@@ -236,7 +236,7 @@
 		if (copylen > sizeof(perfstr)-strlen(perfstr)-1)
 			copylen = sizeof(perfstr)-strlen(perfstr)-1;
 		ptr2 = ptr;
-		ptr = foo; 
+		ptr = foo;
 
 		if (ptr == NULL)
 			break;
@@ -309,7 +309,7 @@
 		    eval_method[i] & WARN_EQ ||
 		    eval_method[i] & WARN_NE) {
 			p2 = strpbrk (p2, "0123456789");
-			if (p2 == NULL) 
+			if (p2 == NULL)
 				die (STATE_UNKNOWN,_("No valid data returned"));
 			response_value[i] = strtoul (p2, NULL, 10);
 			iresult = check_num (i);
@@ -346,7 +346,7 @@
 				iresult = STATE_CRITICAL;
 			else if (eval_method[i] & WARN_PRESENT)
 				iresult = STATE_WARNING;
-			else if (response && iresult == STATE_DEPENDENT) 
+			else if (response && iresult == STATE_DEPENDENT)
 				iresult = STATE_OK;
 		}
 
@@ -473,7 +473,7 @@
 			usage5 ();
 		case 'h':	/* help */
 			print_help ();
-			exit (STATE_OK); 
+			exit (STATE_OK);
 		case 'V':	/* version */
 			print_revision (progname, revision);
 			exit (STATE_OK);
@@ -571,7 +571,7 @@
 				jj++;
 				ii++;
 			}
-			if (c == 'E') 
+			if (c == 'E')
 				eval_method[j+1] |= WARN_PRESENT;
 			else if (c == 'e')
 				eval_method[j+1] |= CRIT_PRESENT;
@@ -672,9 +672,9 @@
 
 	if (community == NULL)
 		community = strdup (DEFAULT_COMMUNITY);
-	
 
 
+
 	return validate_arguments ();
 }
 
@@ -687,8 +687,8 @@
 
 <para>&PROTO_validate_arguments;</para>
 
-<para>Checks to see if the default miblist needs to be loaded. Also verifies 
-the authentication and authorization combinations based on protocol version 
+<para>Checks to see if the default miblist needs to be loaded. Also verifies
+the authentication and authorization combinations based on protocol version
 selected.</para>
 
 <para></para>
@@ -713,16 +713,16 @@
 
 
 	/* Need better checks to verify seclevel and authproto choices */
-	
-	if (seclevel == NULL) 
+
+	if (seclevel == NULL)
 		asprintf (&seclevel, "noAuthNoPriv");
 
 
-	if (authproto == NULL ) 
+	if (authproto == NULL )
 		asprintf(&authproto, DEFAULT_AUTH_PROTOCOL);
-	
-	 
-	
+
+
+
 	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {	/* default protocol version */
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&authpriv, "%s%s", "-c ", community);
@@ -732,7 +732,7 @@
 	}
 	else if ( strcmp (proto, "3") == 0 ) {		/* snmpv3 args */
 		asprintf(&proto, "%s", "3");
-		
+
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
 			asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
 		}
@@ -752,12 +752,12 @@
 			}
 			asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
 		}
-		
+
 	}
 	else {
 		usage2 (_("Invalid SNMP version"), proto);
 	}
-			
+
 	return OK;
 }
 

Modified: nagiosplug/trunk/plugins/check_ssh.c
===================================================================
--- nagiosplug/trunk/plugins/check_ssh.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ssh.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -78,7 +78,7 @@
 
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);
-	
+
 	alarm (socket_timeout);
 
 	/* ssh_connect exits if error is found */
@@ -255,7 +255,7 @@
 			close(sd);
 			exit (STATE_WARNING);
 		}
-		
+
 		printf
 			(_("SSH OK - %s (protocol %s)\n"),
 			 ssh_server, ssh_proto);
@@ -294,7 +294,7 @@
 
 	printf (" %s\n", "-r, --remote-version=STRING");
   printf ("    %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));
-	
+
 	printf (_(UT_VERBOSE));
 
 #ifdef NP_EXTRA_OPTS

Modified: nagiosplug/trunk/plugins/check_swap.c
===================================================================
--- nagiosplug/trunk/plugins/check_swap.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_swap.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -507,7 +507,7 @@
 		return ERROR;
 	}
 	else if (warn_percent < crit_percent) {
-		usage4 
+		usage4
 			(_("Warning percentage should be more than critical percentage"));
 	}
 	else if (warn_size_bytes < crit_size_bytes) {

Modified: nagiosplug/trunk/plugins/check_tcp.c
===================================================================
--- nagiosplug/trunk/plugins/check_tcp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_tcp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -24,7 +24,7 @@
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*  
+*
 * $Id$
 * 
 *****************************************************************************/
@@ -315,7 +315,7 @@
 	}
 #ifdef HAVE_SSL
 	np_net_ssl_cleanup();
-#endif 
+#endif
 	if (sd) close (sd);
 
 	microsec = deltime (tv);

Modified: nagiosplug/trunk/plugins/check_time.c
===================================================================
--- nagiosplug/trunk/plugins/check_time.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_time.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -115,7 +115,7 @@
 				result = STATE_WARNING;
 			else
 				result = STATE_UNKNOWN;
-			die (result, 
+			die (result,
 			  _("TIME UNKNOWN - could not send UDP request to server %s, port %d\n"),
 			  server_address, server_port);
 		}

Modified: nagiosplug/trunk/plugins/check_ups.c
===================================================================
--- nagiosplug/trunk/plugins/check_ups.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/check_ups.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -403,7 +403,7 @@
 	int len;
 
 	*buf=0;
-	
+
 	/* create the command string to send to the UPS daemon */
 	/* Add LOGOUT to avoid read failure logs */
 	sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
@@ -453,7 +453,7 @@
 }
 
 
-/* Command line: CHECK_UPS -H <host_address> -u ups [-p port] [-v variable] 
+/* Command line: CHECK_UPS -H <host_address> -u ups [-p port] [-v variable]
 			   [-wv warn_value] [-cv crit_value] [-to to_sec] */
 
 
@@ -508,7 +508,7 @@
 				usage2 (_("Invalid hostname/address"), optarg);
 			}
 			break;
-		case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Farenheit) */ 
+		case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Farenheit) */
 			temp_output_c = 1;
 			break;
 		case 'u':									/* ups name */

Modified: nagiosplug/trunk/plugins/netutils.c
===================================================================
--- nagiosplug/trunk/plugins/netutils.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/netutils.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -35,7 +35,7 @@
 #include "common.h"
 #include "netutils.h"
 
-unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; 
+unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT;
 int econn_refuse_state = STATE_CRITICAL;
 int was_refused = FALSE;
 #if USE_IPV6
@@ -57,8 +57,8 @@
 }
 
 
-/* connects to a host on a specified tcp port, sends a string, and gets a 
-	 response. loops on select-recv until timeout or eof to get all of a 
+/* connects to a host on a specified tcp port, sends a string, and gets a
+	 response. loops on select-recv until timeout or eof to get all of a
 	 multi-packet answer */
 int
 process_tcp_request2 (const char *server_address, int server_port,
@@ -106,7 +106,7 @@
 		}
 		else {											/* it has */
 			recv_result =
-				recv (sd, recv_buffer + recv_length, 
+				recv (sd, recv_buffer + recv_length,
 					(size_t)recv_size - recv_length - 1, 0);
 			if (recv_result == -1) {
 				/* recv failed, bail out */
@@ -137,7 +137,7 @@
 }
 
 
-/* connects to a host on a specified port, sends a string, and gets a 
+/* connects to a host on a specified port, sends a string, and gets a
    response */
 int
 process_request (const char *server_address, int server_port, int proto,
@@ -229,7 +229,7 @@
 			r = r->ai_next;
 		}
 		freeaddrinfo (res);
-	} 
+	}
 	/* else the hostname is interpreted as a path to a unix socket */
 	else {
 		if(strlen(host_name) >= UNIX_PATH_MAX){
@@ -251,7 +251,7 @@
 		return STATE_OK;
 	else if (was_refused) {
 		switch (econn_refuse_state) { /* a user-defined expected outcome */
-		case STATE_OK:       
+		case STATE_OK:
 		case STATE_WARNING:  /* user wants WARN or OK on refusal */
 			return econn_refuse_state;
 			break;
@@ -285,7 +285,7 @@
 		result = STATE_WARNING;
 	}
 
-	/* wait up to the number of seconds for socket timeout minus one 
+	/* wait up to the number of seconds for socket timeout minus one
 	   for data from the host */
 	tv.tv_sec = socket_timeout - 1;
 	tv.tv_usec = 0;
@@ -340,7 +340,7 @@
 #ifdef USE_IPV6
 	if (address_family == AF_INET && is_inet_addr (address))
 		return TRUE;
-	else if (address_family == AF_INET6 && is_inet6_addr (address)) 
+	else if (address_family == AF_INET6 && is_inet6_addr (address))
 		return TRUE;
 #else
 	if (is_inet_addr (address))

Modified: nagiosplug/trunk/plugins/popen.c
===================================================================
--- nagiosplug/trunk/plugins/popen.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/popen.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -140,7 +140,7 @@
 	/* there cannot be more args than characters */
 	argc = strlen (cmdstring) + 1;	/* add 1 for NULL termination */
 	argv = malloc (sizeof(char*)*argc);
-	
+
 	if (argv == NULL) {
 		printf ("%s\n", _("Could not malloc argv array in popen()"));
 		return NULL;
@@ -165,7 +165,7 @@
 		}
 		else if (strcspn(str,"'") < strcspn (str, " \t\r\n")) {
 										/* handle --option='foo bar' strings */
-			tmp = str + strcspn(str, "'") + 1; 
+			tmp = str + strcspn(str, "'") + 1;
 			if (!strstr (tmp, "'"))
 				return NULL;						/* balanced? */
 			tmp += strcspn(tmp,"'") + 1;

Modified: nagiosplug/trunk/plugins/urlize.c
===================================================================
--- nagiosplug/trunk/plugins/urlize.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins/urlize.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -79,7 +79,7 @@
 
 	while (1) {
 		c = getopt_long (argc, argv, "+hVu:", longopts, &option);
-		
+
 		if (c == -1 || c == EOF)
 			break;
 
@@ -144,7 +144,7 @@
 	printf ("%s", nstr);
 	printf ("</A>");
 	nstr = strtok(NULL, PERF_CHARACTER);
-	if (nstr != NULL) 
+	if (nstr != NULL)
 		printf (" | %s", nstr);
 
 	/* close the pipe */

Modified: nagiosplug/trunk/plugins-root/check_dhcp.c
===================================================================
--- nagiosplug/trunk/plugins-root/check_dhcp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins-root/check_dhcp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -79,8 +79,8 @@
 
 #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__)
 
-#define INSAP 22 
-#define OUTSAP 24 
+#define INSAP 22
+#define OUTSAP 24
 
 #include <signal.h>
 #include <ctype.h>
@@ -90,17 +90,17 @@
 
 #define bcopy(source, destination, length) memcpy(destination, source, length)
 
-#define AREA_SZ 5000		/* buffer length in bytes */ 
+#define AREA_SZ 5000		/* buffer length in bytes */
 static u_long ctl_area[AREA_SZ];
 static u_long dat_area[AREA_SZ];
 static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area};
 static struct strbuf dat = {AREA_SZ, 0, (char *)dat_area};
 
-#define GOT_CTRL 1 
-#define GOT_DATA 2 
-#define GOT_BOTH 3 
-#define GOT_INTR 4 
-#define GOT_ERR 128 
+#define GOT_CTRL 1
+#define GOT_DATA 2
+#define GOT_BOTH 3
+#define GOT_INTR 4
+#define GOT_ERR 128
 
 #define u_int8_t	 uint8_t
 #define u_int16_t	uint16_t
@@ -222,7 +222,7 @@
 requested_server *requested_server_list=NULL;
 
 int valid_responses=0;     /* number of valid DHCPOFFERs we received */
-int requested_servers=0;   
+int requested_servers=0;
 int requested_responses=0;
 
 int request_specific_address=FALSE;
@@ -382,7 +382,7 @@
 		unit = atoi(p) ;
 		*p = '\0' ;
 		strncat(dev, interface_name, 6) ;
-		} 
+		}
 	else{
 		printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name);
 		exit(STATE_UNKNOWN);
@@ -535,7 +535,7 @@
 	/* send the DHCPDISCOVER packet out */
 	send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast);
 
-	if(verbose) 
+	if(verbose)
 		printf("\n\n");
 
 	return OK;
@@ -564,7 +564,7 @@
 		if((current_time-start_time)>=dhcpoffer_timeout)
 			break;
 
-		if(verbose) 
+		if(verbose)
 			printf("\n\n");
 
 		bzero(&source,sizeof(source));
@@ -581,7 +581,7 @@
 			continue;
 		        }
 		else{
-			if(verbose) 
+			if(verbose)
 				printf(_("Result=OK\n"));
 
 			responses++;
@@ -626,7 +626,7 @@
 			printf("\n");
 
 		if(result==ERROR){
-			if(verbose) 
+			if(verbose)
 				printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n"));
 
 			continue;
@@ -660,7 +660,7 @@
 
 	result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest));
 
-	if(verbose) 
+	if(verbose)
 		printf(_("send_dhcp_packet result: %d\n"),result);
 
 	if(result<0)
@@ -853,7 +853,7 @@
 		/* get option length */
 		option_length=offer_packet->options[x++];
 
-		if(verbose) 
+		if(verbose)
 			printf("Option: %d (0x%02X)\n",option_type,option_length);
 
 		/* get option data */
@@ -989,7 +989,7 @@
 					if(verbose){
 						printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address));
 						printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address));
-						if(temp_server->answered) 
+						if(temp_server->answered)
 							printf(_(" (duplicate)"));
 						printf(_("\n"));
 						}
@@ -1090,7 +1090,7 @@
 
 	int option_index = 0;
 	static struct option long_options[] =
-	{ 
+	{
 		{"serverip",       required_argument,0,'s'},
 		{"requestedip",    required_argument,0,'r'},
 		{"timeout",        required_argument,0,'t'},
@@ -1306,7 +1306,7 @@
 
 /***********************************************************************
  * interface:
- * function mac_addr_dlpi - get the mac address of the interface with 
+ * function mac_addr_dlpi - get the mac address of the interface with
  *                          type dev (eg lnc, hme) and unit (0, 1 ..)
  *
  * parameter: addr: an array of six bytes, has to be allocated by the caller

Modified: nagiosplug/trunk/plugins-root/check_icmp.c
===================================================================
--- nagiosplug/trunk/plugins-root/check_icmp.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins-root/check_icmp.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -1313,7 +1313,7 @@
   printf ("    %s",_("timeout value (seconds, currently  "));
   printf ("%u)\n", timeout);
   printf (" %s\n", "-b");
-  printf ("    %s\n", _("Number of icmp data bytes to send")); 
+  printf ("    %s\n", _("Number of icmp data bytes to send"));
   printf ("    %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN);
   printf (" %s\n", "-v");
   printf ("    %s\n", _("verbose"));

Modified: nagiosplug/trunk/plugins-root/pst3.c
===================================================================
--- nagiosplug/trunk/plugins-root/pst3.c	2008-11-19 05:59:33 UTC (rev 2086)
+++ nagiosplug/trunk/plugins-root/pst3.c	2008-11-19 06:45:18 UTC (rev 2087)
@@ -8,7 +8,7 @@
 * Description:
 * 
 * This file contains the pst3 executable. This is a replacement ps command
-* for Solaris to get output which provides a long argument listing, which 
+* for Solaris to get output which provides a long argument listing, which
 * is not possible with the standard ps command (due to truncation). /usr/ucb/ps
 * also has issues where some fields run into each other.
 * 
@@ -17,7 +17,7 @@
 *
 * Originally written by R.W.Ingraham
 * Rewritten by Duncan Ferguson (Altinity Ltd, June 2008)
-*   The rewrite was necessary as /dev/kmem is not available within 
+*   The rewrite was necessary as /dev/kmem is not available within
 *   non-global zones on Solaris 10
 *
 *   Details for rewrite came from
@@ -48,7 +48,7 @@
 #include <fcntl.h>
 #include <procfs.h>
 #include <errno.h>
-#include <sys/types32.h> 
+#include <sys/types32.h>
 
 /*
  *  Constants
@@ -125,8 +125,8 @@
     char *procname;
     char *ptr;
     int argslen;
-    uintptr_t args_addr;; 
-    uintptr_t *args_vecs;; 
+    uintptr_t args_addr;;
+    uintptr_t *args_vecs;;
     int args_count;
 
     if(proc->d_name[0] == '.')
@@ -146,8 +146,8 @@
       close(ps_fd);
       close(as_fd);
       if(err == EAGAIN) goto try_again;
-      if(err != ENOENT) 
-        fprintf(stderr, "%s: read() on %s: %s\n", szProg, 
+      if(err != ENOENT)
+        fprintf(stderr, "%s: read() on %s: %s\n", szProg,
           ps_name, strerror(err));
       continue;
     }
@@ -185,7 +185,7 @@
     );
     free(procname);
 
-    /* 
+    /*
      * and now for the command line stuff
      */
 
@@ -195,18 +195,18 @@
 
     if(psinfo.pr_dmodel == PR_MODEL_NATIVE) {
       /* this process matches target process */
-      pread(as_fd,args_vecs, args_count * sizeof(uintptr_t), 
+      pread(as_fd,args_vecs, args_count * sizeof(uintptr_t),
         args_addr);
-    } else { 
+    } else {
       /* this process is 64bit, target process is 32 bit*/
       caddr32_t *args_vecs32 = (caddr32_t *)args_vecs;
-      pread(as_fd,args_vecs32,args_count * sizeof(caddr32_t), 
+      pread(as_fd,args_vecs32,args_count * sizeof(caddr32_t),
         args_addr);
       for (i=args_count-1;i>=0;--i)
         args_vecs[i]=args_vecs32[i];
     }
 
-    /* 
+    /*
      * now read in the args - if what we read in fills buffer
      * resize buffer and reread that bit again
      */


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list