Quellcode durchsuchen

Bulk EOL cleanup

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


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest vor 17 Jahren
Ursprung
Commit
caa8bd6423

+ 3 - 3
lib/parse_ini.c

@@ -82,7 +82,7 @@ static void parse_locator(const char *locator, const char *def_stanza, np_ini_in
 	} else {
 	} else {
 		i->file=strdup(&(locator[stanza_len+1]));
 		i->file=strdup(&(locator[stanza_len+1]));
 	}
 	}
-	
+
 	if(i->file==NULL || i->stanza==NULL){
 	if(i->file==NULL || i->stanza==NULL){
 		die(STATE_UNKNOWN, _("malloc() failed!\n"));
 		die(STATE_UNKNOWN, _("malloc() failed!\n"));
 	}
 	}
@@ -110,7 +110,7 @@ np_arg_list* np_get_defaults(const char *locator, const char *default_section){
 		if(inifile!=stdin) fclose(inifile);
 		if(inifile!=stdin) fclose(inifile);
 	}
 	}
 	free(i.stanza);
 	free(i.stanza);
-	return defaults;	
+	return defaults;
 }
 }
 
 
 /* read_defaults is where the meat of the parsing takes place.
 /* read_defaults is where the meat of the parsing takes place.
@@ -161,7 +161,7 @@ static int read_defaults(FILE *f, const char *stanza, np_arg_list **opts){
 			default:
 			default:
 				switch(stanzastate){
 				switch(stanzastate){
 					/* we never found the start of the first stanza, so
 					/* 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:
 					case NOSTANZA:
 						die(STATE_UNKNOWN, _("Config file error"));
 						die(STATE_UNKNOWN, _("Config file error"));

+ 2 - 2
lib/utils_base.c

@@ -89,7 +89,7 @@ range
 		set_range_end(temp_range, end);
 		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->end_infinity == TRUE ||
 		temp_range->start <= temp_range->end) {
 		temp_range->start <= temp_range->end) {
 		return temp_range;
 		return temp_range;
@@ -164,7 +164,7 @@ check_range(double value, range *my_range)
 {
 {
 	int no = FALSE;
 	int no = FALSE;
 	int yes = TRUE;
 	int yes = TRUE;
-	
+
 	if (my_range->alert_on == INSIDE) {
 	if (my_range->alert_on == INSIDE) {
 		no = TRUE;
 		no = TRUE;
 		yes = FALSE;
 		yes = FALSE;

+ 4 - 4
lib/utils_disk.c

@@ -91,7 +91,7 @@ np_del_parameter(struct parameter_list *item, struct parameter_list *prev)
   return next;
   return next;
 }
 }
 
 
-  
+
 /* returns a pointer to the struct found in the list */
 /* returns a pointer to the struct found in the list */
 struct parameter_list *
 struct parameter_list *
 np_find_parameter(struct parameter_list *list, const char *name)
 np_find_parameter(struct parameter_list *list, const char *name)
@@ -101,7 +101,7 @@ np_find_parameter(struct parameter_list *list, const char *name)
     if (! strcmp(temp_list->name, name))
     if (! strcmp(temp_list->name, name))
         return temp_list;
         return temp_list;
   }
   }
-        
+
   return NULL;
   return NULL;
 }
 }
 
 
@@ -126,7 +126,7 @@ np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list
       if (! best_match) {
       if (! best_match) {
         for (me = mount_list; me; me = me->me_next) {
         for (me = mount_list; me; me = me->me_next) {
           size_t len = strlen (me->me_mountdir);
           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)))
              (len == 1 || strncmp (me->me_mountdir, d->name, len) == 0)))
              || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0))
              || (exact == TRUE && strcmp(me->me_mountdir, d->name)==0))
           {
           {
@@ -175,7 +175,7 @@ np_seen_name(struct name_list *list, const char *name)
 }
 }
 
 
 int
 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 ||
   if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 ||
       regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {
       regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) {

+ 19 - 19
plugins-root/check_dhcp.c

@@ -79,8 +79,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 
 #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__)
 #elif defined(__sun__) || defined(__solaris__) || defined(__hpux__)
 
 
-#define INSAP 22 
-#define OUTSAP 24 
+#define INSAP 22
+#define OUTSAP 24
 
 
 #include <signal.h>
 #include <signal.h>
 #include <ctype.h>
 #include <ctype.h>
@@ -90,17 +90,17 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
 
 #define bcopy(source, destination, length) memcpy(destination, source, length)
 #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 ctl_area[AREA_SZ];
 static u_long dat_area[AREA_SZ];
 static u_long dat_area[AREA_SZ];
 static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area};
 static struct strbuf ctl = {AREA_SZ, 0, (char *)ctl_area};
 static struct strbuf dat = {AREA_SZ, 0, (char *)dat_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_int8_t	 uint8_t
 #define u_int16_t	uint16_t
 #define u_int16_t	uint16_t
@@ -222,7 +222,7 @@ dhcp_offer *dhcp_offer_list=NULL;
 requested_server *requested_server_list=NULL;
 requested_server *requested_server_list=NULL;
 
 
 int valid_responses=0;     /* number of valid DHCPOFFERs we received */
 int valid_responses=0;     /* number of valid DHCPOFFERs we received */
-int requested_servers=0;   
+int requested_servers=0;
 int requested_responses=0;
 int requested_responses=0;
 
 
 int request_specific_address=FALSE;
 int request_specific_address=FALSE;
@@ -382,7 +382,7 @@ int get_hardware_address(int sock,char *interface_name){
 		unit = atoi(p) ;
 		unit = atoi(p) ;
 		*p = '\0' ;
 		*p = '\0' ;
 		strncat(dev, interface_name, 6) ;
 		strncat(dev, interface_name, 6) ;
-		} 
+		}
 	else{
 	else{
 		printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name);
 		printf(_("Error: can't find unit number in interface_name (%s) - expecting TypeNumber eg lnc0.\n"), interface_name);
 		exit(STATE_UNKNOWN);
 		exit(STATE_UNKNOWN);
@@ -535,7 +535,7 @@ int send_dhcp_discover(int sock){
 	/* send the DHCPDISCOVER packet out */
 	/* send the DHCPDISCOVER packet out */
 	send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast);
 	send_dhcp_packet(&discover_packet,sizeof(discover_packet),sock,&sockaddr_broadcast);
 
 
-	if(verbose) 
+	if(verbose)
 		printf("\n\n");
 		printf("\n\n");
 
 
 	return OK;
 	return OK;
@@ -564,7 +564,7 @@ int get_dhcp_offer(int sock){
 		if((current_time-start_time)>=dhcpoffer_timeout)
 		if((current_time-start_time)>=dhcpoffer_timeout)
 			break;
 			break;
 
 
-		if(verbose) 
+		if(verbose)
 			printf("\n\n");
 			printf("\n\n");
 
 
 		bzero(&source,sizeof(source));
 		bzero(&source,sizeof(source));
@@ -581,7 +581,7 @@ int get_dhcp_offer(int sock){
 			continue;
 			continue;
 		        }
 		        }
 		else{
 		else{
-			if(verbose) 
+			if(verbose)
 				printf(_("Result=OK\n"));
 				printf(_("Result=OK\n"));
 
 
 			responses++;
 			responses++;
@@ -626,7 +626,7 @@ int get_dhcp_offer(int sock){
 			printf("\n");
 			printf("\n");
 
 
 		if(result==ERROR){
 		if(result==ERROR){
-			if(verbose) 
+			if(verbose)
 				printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n"));
 				printf(_("DHCPOFFER hardware address did not match our own - ignoring packet\n"));
 
 
 			continue;
 			continue;
@@ -660,7 +660,7 @@ int send_dhcp_packet(void *buffer, int buffer_size, int sock, struct sockaddr_in
 
 
 	result=sendto(sock,(char *)buffer,buffer_size,0,(struct sockaddr *)dest,sizeof(*dest));
 	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);
 		printf(_("send_dhcp_packet result: %d\n"),result);
 
 
 	if(result<0)
 	if(result<0)
@@ -853,7 +853,7 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){
 		/* get option length */
 		/* get option length */
 		option_length=offer_packet->options[x++];
 		option_length=offer_packet->options[x++];
 
 
-		if(verbose) 
+		if(verbose)
 			printf("Option: %d (0x%02X)\n",option_type,option_length);
 			printf("Option: %d (0x%02X)\n",option_type,option_length);
 
 
 		/* get option data */
 		/* get option data */
@@ -989,7 +989,7 @@ int get_results(void){
 					if(verbose){
 					if(verbose){
 						printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address));
 						printf(_("DHCP Server Match: Offerer=%s"),inet_ntoa(temp_offer->server_address));
 						printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address));
 						printf(_(" Requested=%s"),inet_ntoa(temp_server->server_address));
-						if(temp_server->answered) 
+						if(temp_server->answered)
 							printf(_(" (duplicate)"));
 							printf(_(" (duplicate)"));
 						printf(_("\n"));
 						printf(_("\n"));
 						}
 						}
@@ -1090,7 +1090,7 @@ int call_getopt(int argc, char **argv){
 
 
 	int option_index = 0;
 	int option_index = 0;
 	static struct option long_options[] =
 	static struct option long_options[] =
-	{ 
+	{
 		{"serverip",       required_argument,0,'s'},
 		{"serverip",       required_argument,0,'s'},
 		{"requestedip",    required_argument,0,'r'},
 		{"requestedip",    required_argument,0,'r'},
 		{"timeout",        required_argument,0,'t'},
 		{"timeout",        required_argument,0,'t'},
@@ -1306,7 +1306,7 @@ static int dl_bind(int fd, int sap, u_char *addr){
 
 
 /***********************************************************************
 /***********************************************************************
  * interface:
  * 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 ..)
  *                          type dev (eg lnc, hme) and unit (0, 1 ..)
  *
  *
  * parameter: addr: an array of six bytes, has to be allocated by the caller
  * parameter: addr: an array of six bytes, has to be allocated by the caller

+ 1 - 1
plugins-root/check_icmp.c

@@ -1313,7 +1313,7 @@ print_help(void)
   printf ("    %s",_("timeout value (seconds, currently  "));
   printf ("    %s",_("timeout value (seconds, currently  "));
   printf ("%u)\n", timeout);
   printf ("%u)\n", timeout);
   printf (" %s\n", "-b");
   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 %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN);
   printf (" %s\n", "-v");
   printf (" %s\n", "-v");
   printf ("    %s\n", _("verbose"));
   printf ("    %s\n", _("verbose"));

+ 12 - 12
plugins-root/pst3.c

@@ -8,7 +8,7 @@
 * Description:
 * Description:
 * 
 * 
 * This file contains the pst3 executable. This is a replacement ps command
 * 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
 * is not possible with the standard ps command (due to truncation). /usr/ucb/ps
 * also has issues where some fields run into each other.
 * also has issues where some fields run into each other.
 * 
 * 
@@ -17,7 +17,7 @@
 *
 *
 * Originally written by R.W.Ingraham
 * Originally written by R.W.Ingraham
 * Rewritten by Duncan Ferguson (Altinity Ltd, June 2008)
 * 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
 *   non-global zones on Solaris 10
 *
 *
 *   Details for rewrite came from
 *   Details for rewrite came from
@@ -48,7 +48,7 @@
 #include <fcntl.h>
 #include <fcntl.h>
 #include <procfs.h>
 #include <procfs.h>
 #include <errno.h>
 #include <errno.h>
-#include <sys/types32.h> 
+#include <sys/types32.h>
 
 
 /*
 /*
  *  Constants
  *  Constants
@@ -125,8 +125,8 @@ int main (int argc, char **argv)
     char *procname;
     char *procname;
     char *ptr;
     char *ptr;
     int argslen;
     int argslen;
-    uintptr_t args_addr;; 
-    uintptr_t *args_vecs;; 
+    uintptr_t args_addr;;
+    uintptr_t *args_vecs;;
     int args_count;
     int args_count;
 
 
     if(proc->d_name[0] == '.')
     if(proc->d_name[0] == '.')
@@ -146,8 +146,8 @@ try_again:
       close(ps_fd);
       close(ps_fd);
       close(as_fd);
       close(as_fd);
       if(err == EAGAIN) goto try_again;
       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));
           ps_name, strerror(err));
       continue;
       continue;
     }
     }
@@ -185,7 +185,7 @@ try_again:
     );
     );
     free(procname);
     free(procname);
 
 
-    /* 
+    /*
      * and now for the command line stuff
      * and now for the command line stuff
      */
      */
 
 
@@ -195,18 +195,18 @@ try_again:
 
 
     if(psinfo.pr_dmodel == PR_MODEL_NATIVE) {
     if(psinfo.pr_dmodel == PR_MODEL_NATIVE) {
       /* this process matches target process */
       /* 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);
         args_addr);
-    } else { 
+    } else {
       /* this process is 64bit, target process is 32 bit*/
       /* this process is 64bit, target process is 32 bit*/
       caddr32_t *args_vecs32 = (caddr32_t *)args_vecs;
       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);
         args_addr);
       for (i=args_count-1;i>=0;--i)
       for (i=args_count-1;i>=0;--i)
         args_vecs[i]=args_vecs32[i];
         args_vecs[i]=args_vecs32[i];
     }
     }
 
 
-    /* 
+    /*
      * now read in the args - if what we read in fills buffer
      * now read in the args - if what we read in fills buffer
      * resize buffer and reread that bit again
      * resize buffer and reread that bit again
      */
      */

+ 3 - 3
plugins/check_apt.c

@@ -116,7 +116,7 @@ int main (int argc, char **argv) {
 		result = max_state(result, STATE_OK);
 		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),
 	       state_text(result),
 	       packages_available,
 	       packages_available,
 	       (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade",
 	       (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade",
@@ -305,7 +305,7 @@ int run_upgrade(int *pkgcount, int *secpkgcount){
 	}
 	}
 	regfree(&ireg);
 	regfree(&ireg);
 	regfree(&sreg);
 	regfree(&sreg);
-	if(do_exclude!=NULL) regfree(&ereg); 
+	if(do_exclude!=NULL) regfree(&ereg);
 	free(cmdline);
 	free(cmdline);
 	return result;
 	return result;
 }
 }
@@ -364,7 +364,7 @@ char* add_to_regexp(char *expr, const char *next){
 		sprintf((char*)(re+strlen(re)-2), "|%s) ", next);
 		sprintf((char*)(re+strlen(re)-2), "|%s) ", next);
 	}
 	}
 
 
-	return re;	
+	return re;
 }
 }
 
 
 char* construct_cmdline(upgrade_type u, const char *opts){
 char* construct_cmdline(upgrade_type u, const char *opts){

+ 2 - 2
plugins/check_cluster.c

@@ -124,7 +124,7 @@ int main(int argc, char **argv){
 		        }
 		        }
 	        }
 	        }
         }
         }
-	
+
 
 
 	/* return the status of the cluster */
 	/* return the status of the cluster */
 	if(check_type==CHECK_SERVICES){
 	if(check_type==CHECK_SERVICES){
@@ -149,7 +149,7 @@ int main(int argc, char **argv){
 int process_arguments(int argc, char **argv){
 int process_arguments(int argc, char **argv){
 	int c;
 	int c;
 	int option=0;
 	int option=0;
-	static struct option longopts[]={ 
+	static struct option longopts[]={
 		{"data",     required_argument,0,'d'},
 		{"data",     required_argument,0,'d'},
 		{"warning",  required_argument,0,'w'},
 		{"warning",  required_argument,0,'w'},
 		{"critical", required_argument,0,'c'},
 		{"critical", required_argument,0,'c'},

+ 12 - 12
plugins/check_disk.c

@@ -198,7 +198,7 @@ main (int argc, char **argv)
   /* If a list of paths has not been selected, find entire
   /* If a list of paths has not been selected, find entire
      mount list and create list of paths
      mount list and create list of paths
    */
    */
-  if (path_selected == FALSE) { 
+  if (path_selected == FALSE) {
     for (me = mount_list; me; me = me->me_next) {
     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 = np_add_parameter(&path_select_list, me->me_mountdir);
@@ -293,8 +293,8 @@ main (int argc, char **argv)
       /* Skip excluded fstypes */
       /* Skip excluded fstypes */
       } else if (fs_exclude_list && np_find_name (fs_exclude_list, me->me_type)) {
       } else if (fs_exclude_list && np_find_name (fs_exclude_list, me->me_type)) {
         continue;
         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_devname) ||
                 np_find_name (dp_exclude_list, me->me_mountdir))) {
                 np_find_name (dp_exclude_list, me->me_mountdir))) {
         continue;
         continue;
@@ -327,7 +327,7 @@ main (int argc, char **argv)
       dfree_inodes_percent = 100 - dused_inodes_percent;
       dfree_inodes_percent = 100 - dused_inodes_percent;
 
 
       if (verbose >= 3) {
       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);
           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 calculate_percent(uintmax_t value, uintmax_t total) {
   double pct = -1;
   double pct = -1;
   /* I don't understand the below, but it is taken from coreutils' df */
   /* I don't understand the below, but it is taken from coreutils' df */
   /* Seems to be calculating pct, in the best possible way */
   /* 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) {
     && total != 0) {
     uintmax_t u100 = value * 100;
     uintmax_t u100 = value * 100;
     pct = u100 / total + (u100 % total != 0);
     pct = u100 / total + (u100 % total != 0);
@@ -546,7 +546,7 @@ process_arguments (int argc, char **argv)
       }
       }
       break;
       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
        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
        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
        force @ at the beginning of the range, so that it is backwards compatible
@@ -620,10 +620,10 @@ process_arguments (int argc, char **argv)
     case 'L':
     case 'L':
       stat_remote_fs = 1;
       stat_remote_fs = 1;
     case 'l':
     case 'l':
-      show_local_fs = 1;      
+      show_local_fs = 1;
       break;
       break;
     case 'p':                 /* select path */
     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 ||
              crit_freespace_percent || warn_usedspace_units || crit_usedspace_units ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
@@ -714,7 +714,7 @@ process_arguments (int argc, char **argv)
     case 'R':
     case 'R':
       cflags |= REG_ICASE;
       cflags |= REG_ICASE;
     case 'r':
     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 ||
              crit_freespace_percent || warn_usedspace_units || crit_usedspace_units ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              warn_usedspace_percent || crit_usedspace_percent || warn_usedinodes_percent ||
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
              crit_usedinodes_percent || warn_freeinodes_percent || crit_freeinodes_percent )) {
@@ -760,7 +760,7 @@ process_arguments (int argc, char **argv)
        if (path_selected == FALSE) {
        if (path_selected == FALSE) {
          struct parameter_list *path;
          struct parameter_list *path;
          for (me = mount_list; me; me = me->me_next) {
          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 = np_add_parameter(&path_select_list, me->me_mountdir);
            path->best_match = me;
            path->best_match = me;
            path->group = group;
            path->group = group;
@@ -819,7 +819,7 @@ process_arguments (int argc, char **argv)
 
 
 
 
 void
 void
-print_path (const char *mypath) 
+print_path (const char *mypath)
 {
 {
   if (mypath == NULL)
   if (mypath == NULL)
     printf ("\n");
     printf ("\n");
@@ -829,7 +829,7 @@ print_path (const char *mypath)
 
 
 
 
 void
 void
-set_all_thresholds (struct parameter_list *path) 
+set_all_thresholds (struct parameter_list *path)
 {
 {
     if (path->freespace_units != NULL) free(path->freespace_units);
     if (path->freespace_units != NULL) free(path->freespace_units);
     set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units);
     set_thresholds(&path->freespace_units, warn_freespace_units, crit_freespace_units);

+ 2 - 2
plugins/check_dns.c

@@ -123,7 +123,7 @@ main (int argc, char **argv)
 
 
   /* scan stdout */
   /* scan stdout */
   for(i = 0; i < chld_out.lines; i++) {
   for(i = 0; i < chld_out.lines; i++) {
-    if (addresses == NULL)  
+    if (addresses == NULL)
       addresses = malloc(sizeof(*addresses)*10);
       addresses = malloc(sizeof(*addresses)*10);
     else if (!(n_addresses % 10))
     else if (!(n_addresses % 10))
       addresses = realloc(addresses,sizeof(*addresses) * (n_addresses + 10));
       addresses = realloc(addresses,sizeof(*addresses) * (n_addresses + 10));
@@ -289,7 +289,7 @@ error_scan (char *input_buffer)
             strstr (input_buffer, ": REFUSED")))
             strstr (input_buffer, ": REFUSED")))
     die (STATE_CRITICAL, _("Connection to DNS %s was refused\n"), dns_server);
     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"))
   else if (strstr (input_buffer, "Query refused"))
     die (STATE_CRITICAL, _("Query was refused by DNS server at %s\n"), dns_server);
     die (STATE_CRITICAL, _("Query was refused by DNS server at %s\n"), dns_server);
 
 

+ 1 - 1
plugins/check_dummy.c

@@ -87,7 +87,7 @@ main (int argc, char **argv)
     return STATE_UNKNOWN;
     return STATE_UNKNOWN;
   }
   }
 
 
-  if (argc >= 3) 
+  if (argc >= 3)
     printf (": %s", argv[2]);
     printf (": %s", argv[2]);
 
 
   printf("\n");
   printf("\n");

+ 4 - 4
plugins/check_game.c

@@ -105,7 +105,7 @@ main (int argc, char **argv)
   /* was thinking about running qstat without any options, capturing the
   /* was thinking about running qstat without any options, capturing the
      -default line, parsing it & making an array of all know server types
      -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
      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
      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
      In the end, I figured I'd simply let an error occur & then trap it
@@ -139,10 +139,10 @@ main (int argc, char **argv)
     result = STATE_CRITICAL;
     result = STATE_CRITICAL;
   }
   }
   else {
   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],
             ret[qstat_game_players_max],
             ret[qstat_game_players_max],
-            ret[qstat_game_field], 
+            ret[qstat_game_field],
             ret[qstat_map_field],
             ret[qstat_map_field],
             ret[qstat_ping_field],
             ret[qstat_ping_field],
             perfdata ("players", atol(ret[qstat_game_players]), "",
             perfdata ("players", atol(ret[qstat_game_players]), "",
@@ -345,7 +345,7 @@ print_usage (void)
  * Test Cases:
  * Test Cases:
  *
  *
  * ./check_game --players 7 -p 8 --map 5 qs 67.20.190.61 26000
  * ./check_game --players 7 -p 8 --map 5 qs 67.20.190.61 26000
- * 
+ *
  * qstat -raw , -qs 67.20.190.61
  * 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
  *  ==> QS,67.20.190.61,Nightmare.fintek.ca,67.20.190.61:26000,3,e2m1,6,0,83,0
  *
  *

+ 6 - 6
plugins/check_hpjd.c

@@ -123,7 +123,7 @@ main (int argc, char **argv)
 		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
 		 HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY);
 
 
 	/* get the command to run */
 	/* 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);
 									address, query_string);
 
 
 	/* run the command */
 	/* run the command */
@@ -198,7 +198,7 @@ main (int argc, char **argv)
 				strcpy (display_message, temp_buffer + 1);
 				strcpy (display_message, temp_buffer + 1);
 				break;
 				break;
 			default:										/* fold multiline message */
 			default:										/* fold multiline message */
-				strncat (display_message, input_buffer, 
+				strncat (display_message, input_buffer,
 						sizeof (display_message) - strlen (display_message) - 1);
 						sizeof (display_message) - strlen (display_message) - 1);
 			}
 			}
 
 
@@ -218,7 +218,7 @@ main (int argc, char **argv)
 		sprintf (errmsg, "%s", input_buffer );
 		sprintf (errmsg, "%s", input_buffer );
 
 
 	}
 	}
-	
+
 	/* close stderr */
 	/* close stderr */
 	(void) fclose (child_stderr);
 	(void) fclose (child_stderr);
 
 
@@ -232,7 +232,7 @@ main (int argc, char **argv)
 		/* might not be the problem, but most likely is. */
 		/* might not be the problem, but most likely is. */
 		result = STATE_UNKNOWN ;
 		result = STATE_UNKNOWN ;
 		asprintf (&errmsg, "%s : Timeout from host %s\n", errmsg, address );
 		asprintf (&errmsg, "%s : Timeout from host %s\n", errmsg, address );
-		 
+
 	}
 	}
 
 
 	/* if we had no read errors, check the printer status results... */
 	/* if we had no read errors, check the printer status results... */
@@ -326,7 +326,7 @@ process_arguments (int argc, char **argv)
 	if (argc < 2)
 	if (argc < 2)
 		return ERROR;
 		return ERROR;
 
 
-	
+
 	while (1) {
 	while (1) {
 		c = getopt_long (argc, argv, "+hVH:C:", longopts, &option);
 		c = getopt_long (argc, argv, "+hVH:C:", longopts, &option);
 
 
@@ -365,7 +365,7 @@ process_arguments (int argc, char **argv)
 			usage2 (_("Invalid hostname/address"), argv[c]);
 			usage2 (_("Invalid hostname/address"), argv[c]);
 		}
 		}
 	}
 	}
-	
+
 	if (community == NULL) {
 	if (community == NULL) {
 		if (argv[c] != NULL )
 		if (argv[c] != NULL )
 			community = argv[c];
 			community = argv[c];

+ 11 - 11
plugins/check_http.c

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

+ 10 - 10
plugins/check_ldap.c

@@ -87,15 +87,15 @@ main (int argc, char *argv[])
 	LDAPMessage *result;
 	LDAPMessage *result;
 
 
 	/* should be 	int result = STATE_UNKNOWN; */
 	/* should be 	int result = STATE_UNKNOWN; */
-	
+
 	int status = STATE_UNKNOWN;
 	int status = STATE_UNKNOWN;
 	long microsec;
 	long microsec;
 	double elapsed_time;
 	double elapsed_time;
-	
+
 	/* for ldap tls */
 	/* for ldap tls */
-	
- 	int tls; 
- 	int version=3;
+
+	int tls;
+	int version=3;
 
 
 	setlocale (LC_ALL, "");
 	setlocale (LC_ALL, "");
 	bindtextdomain (PACKAGE, LOCALEDIR);
 	bindtextdomain (PACKAGE, LOCALEDIR);
@@ -129,7 +129,7 @@ main (int argc, char *argv[])
 		printf ("Could not connect to the server at port %i\n", ld_port);
 		printf ("Could not connect to the server at port %i\n", ld_port);
 		return STATE_CRITICAL;
 		return STATE_CRITICAL;
 	}
 	}
-#else	
+#else
 	if (!(ld = ldap_open (ld_host, ld_port))) {
 	if (!(ld = ldap_open (ld_host, ld_port))) {
 		if (verbose)
 		if (verbose)
 			ldap_perror(ld, "ldap_open");
 			ldap_perror(ld, "ldap_open");
@@ -137,7 +137,7 @@ main (int argc, char *argv[])
 		return STATE_CRITICAL;
 		return STATE_CRITICAL;
 	}
 	}
 #endif /* HAVE_LDAP_INIT */
 #endif /* HAVE_LDAP_INIT */
-	
+
 #ifdef HAVE_LDAP_SET_OPTION
 #ifdef HAVE_LDAP_SET_OPTION
 	/* set ldap options */
 	/* set ldap options */
 	if (ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &ld_protocol) !=
 	if (ldap_set_option (ld, LDAP_OPT_PROTOCOL_VERSION, &ld_protocol) !=
@@ -152,7 +152,7 @@ main (int argc, char *argv[])
 #if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS)
 #if defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS)
 		/* ldaps: set option tls */
 		/* ldaps: set option tls */
 		tls = LDAP_OPT_X_TLS_HARD;
 		tls = LDAP_OPT_X_TLS_HARD;
-		
+
 		if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS)
 		if (ldap_set_option (ld, LDAP_OPT_X_TLS, &tls) != LDAP_SUCCESS)
 		{
 		{
 			if (verbose)
 			if (verbose)
@@ -179,7 +179,7 @@ main (int argc, char *argv[])
 		/* call start_tls */
 		/* call start_tls */
 		if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)
 		if (ldap_start_tls_s(ld, NULL, NULL) != LDAP_SUCCESS)
 		{
 		{
-			if (verbose) 
+			if (verbose)
 				ldap_perror(ld, "ldap_start_tls");
 				ldap_perror(ld, "ldap_start_tls");
 			printf (_("Could not init startTLS at port %i!\n"), ld_port);
 			printf (_("Could not init startTLS at port %i!\n"), ld_port);
 			return STATE_CRITICAL;
 			return STATE_CRITICAL;
@@ -189,7 +189,7 @@ main (int argc, char *argv[])
 		return STATE_CRITICAL;
 		return STATE_CRITICAL;
 #endif /* HAVE_LDAP_START_TLS_S */
 #endif /* HAVE_LDAP_START_TLS_S */
 	}
 	}
-	
+
 	/* bind to the ldap server */
 	/* bind to the ldap server */
 	if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) !=
 	if (ldap_bind_s (ld, ld_binddn, ld_passwd, LDAP_AUTH_SIMPLE) !=
 			LDAP_SUCCESS) {
 			LDAP_SUCCESS) {

+ 1 - 1
plugins/check_mrtg.c

@@ -380,7 +380,7 @@ print_help (void)
 
 
 
 
 
 
-/* original command line: 
+/* original command line:
 	 <log_file> <expire_minutes> <AVG|MAX> <variable> <vwl> <vcl> <label> [units] */
 	 <log_file> <expire_minutes> <AVG|MAX> <variable> <vwl> <vcl> <label> [units] */
 
 
 void
 void

+ 3 - 3
plugins/check_mysql.c

@@ -71,9 +71,9 @@ main (int argc, char **argv)
 	MYSQL mysql;
 	MYSQL mysql;
 	MYSQL_RES *res;
 	MYSQL_RES *res;
 	MYSQL_ROW row;
 	MYSQL_ROW row;
-	
+
 	/* should be status */
 	/* should be status */
-	
+
 	char *result = NULL;
 	char *result = NULL;
 	char *error = NULL;
 	char *error = NULL;
 	char slaveresult[SLAVERESULTSIZE];
 	char slaveresult[SLAVERESULTSIZE];
@@ -186,7 +186,7 @@ main (int argc, char **argv)
 				mysql_close (&mysql);
 				mysql_close (&mysql);
 				die (STATE_CRITICAL, "Slave status unavailable\n");
 				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]);
 			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) {
 			if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) {
 				mysql_free_result (res);
 				mysql_free_result (res);

+ 2 - 2
plugins/check_nagios.c

@@ -187,8 +187,8 @@ main (int argc, char **argv)
 	printf (ngettext ("%d process", "%d processes", proc_entries), proc_entries);
 	printf (ngettext ("%d process", "%d processes", proc_entries), proc_entries);
 	printf (", ");
 	printf (", ");
 	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) ),
 	    (int) (current_time - latest_entry_time) );
 	    (int) (current_time - latest_entry_time) );
 	printf ("\n");
 	printf ("\n");

+ 5 - 5
plugins/check_ntp.c

@@ -80,7 +80,7 @@ typedef struct {
 
 
 /* this structure holds data about results from querying offset from a peer */
 /* this structure holds data about results from querying offset from a peer */
 typedef struct {
 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 */
 	int num_responses;      /* number of successfully recieved responses */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
@@ -150,7 +150,7 @@ typedef struct {
  they are divided into halves, each being a 16-bit int in network byte order:
  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 first 16 bits are an int on the left side of a decimal point.
  - the second 16 bits represent a fraction n/(2^16)
  - 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"
 /* macros to access the left/right 16 bits of a 32-bit ntp "fixed point"
@@ -265,7 +265,7 @@ void print_ntp_control_message(const ntp_control_message *p){
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 		peer=(ntp_assoc_status_pair*)p->data;
 		peer=(ntp_assoc_status_pair*)p->data;
 		for(i=0;i<numpeers;i++){
 		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));
 			       ntohs(peer[i].assoc), ntohs(peer[i].status));
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
@@ -353,7 +353,7 @@ int best_offset_server(const ntp_server_results *slist, int nservers){
 
 
 /* do everything we need to get the total average offset
 /* do everything we need to get the total average offset
  * - we use a certain amount of parallelization with poll() to ensure
  * - 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 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 :( */
  *   we have to do it in a way that our lazy macros don't handle currently :( */
 double offset_request(const char *host, int *status){
 double offset_request(const char *host, int *status){
@@ -667,7 +667,7 @@ int process_arguments(int argc, char **argv){
 		{0, 0, 0, 0}
 		{0, 0, 0, 0}
 	};
 	};
 
 
-	
+
 	if (argc < 2)
 	if (argc < 2)
 		usage ("\n");
 		usage ("\n");
 
 

+ 2 - 2
plugins/check_ntp_peer.c

@@ -162,7 +162,7 @@ void print_ntp_control_message(const ntp_control_message *p){
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 	if(p->op&REM_RESP && p->op&OP_READSTAT){
 		peer=(ntp_assoc_status_pair*)p->data;
 		peer=(ntp_assoc_status_pair*)p->data;
 		for(i=0;i<numpeers;i++){
 		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));
 			       ntohs(peer[i].assoc), ntohs(peer[i].status));
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 			if (PEER_SEL(peer[i].status) >= PEER_INCLUDED){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
 				if(PEER_SEL(peer[i].status) >= PEER_SYNCSOURCE){
@@ -477,7 +477,7 @@ int process_arguments(int argc, char **argv){
 		{0, 0, 0, 0}
 		{0, 0, 0, 0}
 	};
 	};
 
 
-	
+
 	if (argc < 2)
 	if (argc < 2)
 		usage ("\n");
 		usage ("\n");
 
 

+ 4 - 4
plugins/check_ntp_time.c

@@ -81,7 +81,7 @@ typedef struct {
 
 
 /* this structure holds data about results from querying offset from a peer */
 /* this structure holds data about results from querying offset from a peer */
 typedef struct {
 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 */
 	int num_responses;      /* number of successfully recieved responses */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	uint8_t stratum;        /* copied verbatim from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
 	double rtdelay;         /* converted from the ntp_message */
@@ -132,7 +132,7 @@ typedef struct {
  they are divided into halves, each being a 16-bit int in network byte order:
  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 first 16 bits are an int on the left side of a decimal point.
  - the second 16 bits represent a fraction n/(2^16)
  - 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"
 /* macros to access the left/right 16 bits of a 32-bit ntp "fixed point"
@@ -299,7 +299,7 @@ int best_offset_server(const ntp_server_results *slist, int nservers){
 
 
 /* do everything we need to get the total average offset
 /* do everything we need to get the total average offset
  * - we use a certain amount of parallelization with poll() to ensure
  * - 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 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 :( */
  *   we have to do it in a way that our lazy macros don't handle currently :( */
 double offset_request(const char *host, int *status){
 double offset_request(const char *host, int *status){
@@ -461,7 +461,7 @@ int process_arguments(int argc, char **argv){
 		{0, 0, 0, 0}
 		{0, 0, 0, 0}
 	};
 	};
 
 
-	
+
 	if (argc < 2)
 	if (argc < 2)
 		usage ("\n");
 		usage ("\n");
 
 

+ 20 - 20
plugins/check_nwstat.c

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

+ 3 - 3
plugins/check_pgsql.c

@@ -186,7 +186,7 @@ main (int argc, char **argv)
 		status = STATE_OK;
 		status = STATE_OK;
 	}
 	}
 	PQfinish (conn);
 	PQfinish (conn);
-	printf (_(" %s - database %s (%d sec.)|%s\n"), 
+	printf (_(" %s - database %s (%d sec.)|%s\n"),
 	        state_text(status), dbName, elapsed_time,
 	        state_text(status), dbName, elapsed_time,
 	        fperfdata("time", elapsed_time, "s",
 	        fperfdata("time", elapsed_time, "s",
 	                 (int)twarn, twarn, (int)tcrit, tcrit, TRUE, 0, FALSE,0));
 	                 (int)twarn, twarn, (int)tcrit, tcrit, TRUE, 0, FALSE,0));
@@ -355,7 +355,7 @@ is_pg_dbname (char *dbname)
 
 
 /**
 /**
 
 
-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
 function prototype
 
 
 @@-
 @@-
@@ -389,7 +389,7 @@ is_pg_logname (char *username)
 
 
 /******************************************************************************
 /******************************************************************************
 @@-
 @@-
-</sect2> 
+</sect2>
 </sect1>
 </sect1>
 </article>
 </article>
 -@@
 -@@

+ 4 - 4
plugins/check_ping.c

@@ -112,7 +112,7 @@ main (int argc, char **argv)
 #endif
 #endif
 
 
 	for (i = 0 ; i < n_addresses ; i++) {
 	for (i = 0 ; i < n_addresses ; i++) {
-		
+
 #ifdef PING6_COMMAND
 #ifdef PING6_COMMAND
 		if (address_family != AF_INET && is_inet6_addr(addresses[i]))
 		if (address_family != AF_INET && is_inet6_addr(addresses[i]))
 			rawcmd = strdup(PING6_COMMAND);
 			rawcmd = strdup(PING6_COMMAND);
@@ -150,8 +150,8 @@ main (int argc, char **argv)
 		else if (pl >= wpl || rta >= wrta)
 		else if (pl >= wpl || rta >= wrta)
 			this_result = STATE_WARNING;
 			this_result = STATE_WARNING;
 		else if (pl >= 0 && rta >= 0)
 		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)
 		if (n_addresses > 1 && this_result != STATE_UNKNOWN)
 			die (STATE_OK, "%s is alive\n", addresses[i]);
 			die (STATE_OK, "%s is alive\n", addresses[i]);
 
 
@@ -370,7 +370,7 @@ get_threshold (char *arg, float *trta, int *tpl)
 		return OK;
 		return OK;
 	else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2)
 	else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2)
 		return OK;
 		return OK;
-	else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) 
+	else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1)
 		return OK;
 		return OK;
 
 
 	usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg);
 	usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg);

+ 2 - 2
plugins/check_radius.c

@@ -169,8 +169,8 @@ main (int argc, char **argv)
 				(nasid==NULL || my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
 				(nasid==NULL || my_rc_avpair_add (&data.send_pairs, PW_NAS_IDENTIFIER, nasid, 0))))
 		die (STATE_UNKNOWN, _("Out of Memory?"));
 		die (STATE_UNKNOWN, _("Out of Memory?"));
 
 
-	/* 
-	 * Fill in NAS-IP-Address 
+	/*
+	 * Fill in NAS-IP-Address
 	 */
 	 */
 
 
 	if ((client_id = my_rc_own_ipaddress ()) == 0)
 	if ((client_id = my_rc_own_ipaddress ()) == 0)

+ 3 - 3
plugins/check_smtp.c

@@ -168,7 +168,7 @@ main (int argc, char **argv)
 
 
 	if (verbose && smtp_use_dummycmd)
 	if (verbose && smtp_use_dummycmd)
 		printf ("FROM CMD: %s", cmd_str);
 		printf ("FROM CMD: %s", cmd_str);
-	
+
 	/* initialize alarm signal handling */
 	/* initialize alarm signal handling */
 	(void) signal (SIGALRM, socket_timeout_alarm_handler);
 	(void) signal (SIGALRM, socket_timeout_alarm_handler);
 
 
@@ -285,7 +285,7 @@ main (int argc, char **argv)
 #  endif /* USE_OPENSSL */
 #  endif /* USE_OPENSSL */
 		}
 		}
 #endif
 #endif
-				
+
 		/* sendmail will syslog a "NOQUEUE" error if session does not attempt
 		/* sendmail will syslog a "NOQUEUE" error if session does not attempt
 		 * to do something useful. This can be prevented by giving a command
 		 * to do something useful. This can be prevented by giving a command
 		 * even if syntax is illegal (MAIL requires a FROM:<...> argument)
 		 * even if syntax is illegal (MAIL requires a FROM:<...> argument)
@@ -746,7 +746,7 @@ recvlines(char *buf, size_t bufsize)
 }
 }
 
 
 
 
-int 
+int
 my_close (void)
 my_close (void)
 {
 {
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL

+ 19 - 19
plugins/check_snmp.c

@@ -199,10 +199,10 @@ main (int argc, char **argv)
 			PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
 			PATH_TO_SNMPGET, timeout_interval, retries, miblist, proto,
 			"[authpriv]", server_address, port, oid);
 			"[authpriv]", server_address, port, oid);
 	}
 	}
-	
+
 	if (verbose)
 	if (verbose)
 		printf ("%s\n", command_line);
 		printf ("%s\n", command_line);
-	
+
 
 
 	/* run the command */
 	/* run the command */
 	child_process = spopen (command_line);
 	child_process = spopen (command_line);
@@ -236,7 +236,7 @@ main (int argc, char **argv)
 		if (copylen > sizeof(perfstr)-strlen(perfstr)-1)
 		if (copylen > sizeof(perfstr)-strlen(perfstr)-1)
 			copylen = sizeof(perfstr)-strlen(perfstr)-1;
 			copylen = sizeof(perfstr)-strlen(perfstr)-1;
 		ptr2 = ptr;
 		ptr2 = ptr;
-		ptr = foo; 
+		ptr = foo;
 
 
 		if (ptr == NULL)
 		if (ptr == NULL)
 			break;
 			break;
@@ -309,7 +309,7 @@ main (int argc, char **argv)
 		    eval_method[i] & WARN_EQ ||
 		    eval_method[i] & WARN_EQ ||
 		    eval_method[i] & WARN_NE) {
 		    eval_method[i] & WARN_NE) {
 			p2 = strpbrk (p2, "0123456789");
 			p2 = strpbrk (p2, "0123456789");
-			if (p2 == NULL) 
+			if (p2 == NULL)
 				die (STATE_UNKNOWN,_("No valid data returned"));
 				die (STATE_UNKNOWN,_("No valid data returned"));
 			response_value[i] = strtoul (p2, NULL, 10);
 			response_value[i] = strtoul (p2, NULL, 10);
 			iresult = check_num (i);
 			iresult = check_num (i);
@@ -346,7 +346,7 @@ main (int argc, char **argv)
 				iresult = STATE_CRITICAL;
 				iresult = STATE_CRITICAL;
 			else if (eval_method[i] & WARN_PRESENT)
 			else if (eval_method[i] & WARN_PRESENT)
 				iresult = STATE_WARNING;
 				iresult = STATE_WARNING;
-			else if (response && iresult == STATE_DEPENDENT) 
+			else if (response && iresult == STATE_DEPENDENT)
 				iresult = STATE_OK;
 				iresult = STATE_OK;
 		}
 		}
 
 
@@ -473,7 +473,7 @@ process_arguments (int argc, char **argv)
 			usage5 ();
 			usage5 ();
 		case 'h':	/* help */
 		case 'h':	/* help */
 			print_help ();
 			print_help ();
-			exit (STATE_OK); 
+			exit (STATE_OK);
 		case 'V':	/* version */
 		case 'V':	/* version */
 			print_revision (progname, revision);
 			print_revision (progname, revision);
 			exit (STATE_OK);
 			exit (STATE_OK);
@@ -571,7 +571,7 @@ process_arguments (int argc, char **argv)
 				jj++;
 				jj++;
 				ii++;
 				ii++;
 			}
 			}
-			if (c == 'E') 
+			if (c == 'E')
 				eval_method[j+1] |= WARN_PRESENT;
 				eval_method[j+1] |= WARN_PRESENT;
 			else if (c == 'e')
 			else if (c == 'e')
 				eval_method[j+1] |= CRIT_PRESENT;
 				eval_method[j+1] |= CRIT_PRESENT;
@@ -672,7 +672,7 @@ process_arguments (int argc, char **argv)
 
 
 	if (community == NULL)
 	if (community == NULL)
 		community = strdup (DEFAULT_COMMUNITY);
 		community = strdup (DEFAULT_COMMUNITY);
-	
+
 
 
 
 
 	return validate_arguments ();
 	return validate_arguments ();
@@ -687,8 +687,8 @@ process_arguments (int argc, char **argv)
 
 
 <para>&PROTO_validate_arguments;</para>
 <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>
 selected.</para>
 
 
 <para></para>
 <para></para>
@@ -713,16 +713,16 @@ validate_arguments ()
 
 
 
 
 	/* Need better checks to verify seclevel and authproto choices */
 	/* Need better checks to verify seclevel and authproto choices */
-	
-	if (seclevel == NULL) 
+
+	if (seclevel == NULL)
 		asprintf (&seclevel, "noAuthNoPriv");
 		asprintf (&seclevel, "noAuthNoPriv");
 
 
 
 
-	if (authproto == NULL ) 
+	if (authproto == NULL )
 		asprintf(&authproto, DEFAULT_AUTH_PROTOCOL);
 		asprintf(&authproto, DEFAULT_AUTH_PROTOCOL);
-	
-	 
-	
+
+
+
 	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {	/* default protocol version */
 	if (proto == NULL || (strcmp(proto,DEFAULT_PROTOCOL) == 0) ) {	/* default protocol version */
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&proto, DEFAULT_PROTOCOL);
 		asprintf(&authpriv, "%s%s", "-c ", community);
 		asprintf(&authpriv, "%s%s", "-c ", community);
@@ -732,7 +732,7 @@ validate_arguments ()
 	}
 	}
 	else if ( strcmp (proto, "3") == 0 ) {		/* snmpv3 args */
 	else if ( strcmp (proto, "3") == 0 ) {		/* snmpv3 args */
 		asprintf(&proto, "%s", "3");
 		asprintf(&proto, "%s", "3");
-		
+
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
 		if ( (strcmp(seclevel, "noAuthNoPriv") == 0) || seclevel == NULL ) {
 			asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
 			asprintf(&authpriv, "%s", "-l noAuthNoPriv" );
 		}
 		}
@@ -752,12 +752,12 @@ validate_arguments ()
 			}
 			}
 			asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
 			asprintf(&authpriv, "-l authPriv -a %s -u %s -A %s -x DES -X %s ", authproto, secname, authpasswd, privpasswd);
 		}
 		}
-		
+
 	}
 	}
 	else {
 	else {
 		usage2 (_("Invalid SNMP version"), proto);
 		usage2 (_("Invalid SNMP version"), proto);
 	}
 	}
-			
+
 	return OK;
 	return OK;
 }
 }
 
 

+ 3 - 3
plugins/check_ssh.c

@@ -78,7 +78,7 @@ main (int argc, char **argv)
 
 
 	/* initialize alarm signal handling */
 	/* initialize alarm signal handling */
 	signal (SIGALRM, socket_timeout_alarm_handler);
 	signal (SIGALRM, socket_timeout_alarm_handler);
-	
+
 	alarm (socket_timeout);
 	alarm (socket_timeout);
 
 
 	/* ssh_connect exits if error is found */
 	/* ssh_connect exits if error is found */
@@ -255,7 +255,7 @@ ssh_connect (char *haddr, int hport, char *remote_version)
 			close(sd);
 			close(sd);
 			exit (STATE_WARNING);
 			exit (STATE_WARNING);
 		}
 		}
-		
+
 		printf
 		printf
 			(_("SSH OK - %s (protocol %s)\n"),
 			(_("SSH OK - %s (protocol %s)\n"),
 			 ssh_server, ssh_proto);
 			 ssh_server, ssh_proto);
@@ -294,7 +294,7 @@ print_help (void)
 
 
 	printf (" %s\n", "-r, --remote-version=STRING");
 	printf (" %s\n", "-r, --remote-version=STRING");
   printf ("    %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));
   printf ("    %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));
-	
+
 	printf (_(UT_VERBOSE));
 	printf (_(UT_VERBOSE));
 
 
 #ifdef NP_EXTRA_OPTS
 #ifdef NP_EXTRA_OPTS

+ 1 - 1
plugins/check_swap.c

@@ -507,7 +507,7 @@ validate_arguments (void)
 		return ERROR;
 		return ERROR;
 	}
 	}
 	else if (warn_percent < crit_percent) {
 	else if (warn_percent < crit_percent) {
-		usage4 
+		usage4
 			(_("Warning percentage should be more than critical percentage"));
 			(_("Warning percentage should be more than critical percentage"));
 	}
 	}
 	else if (warn_size_bytes < crit_size_bytes) {
 	else if (warn_size_bytes < crit_size_bytes) {

+ 2 - 2
plugins/check_tcp.c

@@ -24,7 +24,7 @@
 * 
 * 
 * You should have received a copy of the GNU General Public License
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*  
+*
 * $Id$
 * $Id$
 * 
 * 
 *****************************************************************************/
 *****************************************************************************/
@@ -315,7 +315,7 @@ main (int argc, char **argv)
 	}
 	}
 #ifdef HAVE_SSL
 #ifdef HAVE_SSL
 	np_net_ssl_cleanup();
 	np_net_ssl_cleanup();
-#endif 
+#endif
 	if (sd) close (sd);
 	if (sd) close (sd);
 
 
 	microsec = deltime (tv);
 	microsec = deltime (tv);

+ 1 - 1
plugins/check_time.c

@@ -115,7 +115,7 @@ main (int argc, char **argv)
 				result = STATE_WARNING;
 				result = STATE_WARNING;
 			else
 			else
 				result = STATE_UNKNOWN;
 				result = STATE_UNKNOWN;
-			die (result, 
+			die (result,
 			  _("TIME UNKNOWN - could not send UDP request to server %s, port %d\n"),
 			  _("TIME UNKNOWN - could not send UDP request to server %s, port %d\n"),
 			  server_address, server_port);
 			  server_address, server_port);
 		}
 		}

+ 3 - 3
plugins/check_ups.c

@@ -403,7 +403,7 @@ get_ups_variable (const char *varname, char *buf, size_t buflen)
 	int len;
 	int len;
 
 
 	*buf=0;
 	*buf=0;
-	
+
 	/* create the command string to send to the UPS daemon */
 	/* create the command string to send to the UPS daemon */
 	/* Add LOGOUT to avoid read failure logs */
 	/* Add LOGOUT to avoid read failure logs */
 	sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
 	sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
@@ -453,7 +453,7 @@ get_ups_variable (const char *varname, char *buf, size_t buflen)
 }
 }
 
 
 
 
-/* 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] */
 			   [-wv warn_value] [-cv crit_value] [-to to_sec] */
 
 
 
 
@@ -508,7 +508,7 @@ process_arguments (int argc, char **argv)
 				usage2 (_("Invalid hostname/address"), optarg);
 				usage2 (_("Invalid hostname/address"), optarg);
 			}
 			}
 			break;
 			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;
 			temp_output_c = 1;
 			break;
 			break;
 		case 'u':									/* ups name */
 		case 'u':									/* ups name */

+ 9 - 9
plugins/netutils.c

@@ -35,7 +35,7 @@
 #include "common.h"
 #include "common.h"
 #include "netutils.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 econn_refuse_state = STATE_CRITICAL;
 int was_refused = FALSE;
 int was_refused = FALSE;
 #if USE_IPV6
 #if USE_IPV6
@@ -57,8 +57,8 @@ socket_timeout_alarm_handler (int sig)
 }
 }
 
 
 
 
-/* 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 */
 	 multi-packet answer */
 int
 int
 process_tcp_request2 (const char *server_address, int server_port,
 process_tcp_request2 (const char *server_address, int server_port,
@@ -106,7 +106,7 @@ process_tcp_request2 (const char *server_address, int server_port,
 		}
 		}
 		else {											/* it has */
 		else {											/* it has */
 			recv_result =
 			recv_result =
-				recv (sd, recv_buffer + recv_length, 
+				recv (sd, recv_buffer + recv_length,
 					(size_t)recv_size - recv_length - 1, 0);
 					(size_t)recv_size - recv_length - 1, 0);
 			if (recv_result == -1) {
 			if (recv_result == -1) {
 				/* recv failed, bail out */
 				/* recv failed, bail out */
@@ -137,7 +137,7 @@ process_tcp_request2 (const char *server_address, int server_port,
 }
 }
 
 
 
 
-/* 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 */
    response */
 int
 int
 process_request (const char *server_address, int server_port, int proto,
 process_request (const char *server_address, int server_port, int proto,
@@ -229,7 +229,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto)
 			r = r->ai_next;
 			r = r->ai_next;
 		}
 		}
 		freeaddrinfo (res);
 		freeaddrinfo (res);
-	} 
+	}
 	/* else the hostname is interpreted as a path to a unix socket */
 	/* else the hostname is interpreted as a path to a unix socket */
 	else {
 	else {
 		if(strlen(host_name) >= UNIX_PATH_MAX){
 		if(strlen(host_name) >= UNIX_PATH_MAX){
@@ -251,7 +251,7 @@ np_net_connect (const char *host_name, int port, int *sd, int proto)
 		return STATE_OK;
 		return STATE_OK;
 	else if (was_refused) {
 	else if (was_refused) {
 		switch (econn_refuse_state) { /* a user-defined expected outcome */
 		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 */
 		case STATE_WARNING:  /* user wants WARN or OK on refusal */
 			return econn_refuse_state;
 			return econn_refuse_state;
 			break;
 			break;
@@ -285,7 +285,7 @@ send_request (int sd, int proto, const char *send_buffer, char *recv_buffer, int
 		result = STATE_WARNING;
 		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 */
 	   for data from the host */
 	tv.tv_sec = socket_timeout - 1;
 	tv.tv_sec = socket_timeout - 1;
 	tv.tv_usec = 0;
 	tv.tv_usec = 0;
@@ -340,7 +340,7 @@ is_addr (const char *address)
 #ifdef USE_IPV6
 #ifdef USE_IPV6
 	if (address_family == AF_INET && is_inet_addr (address))
 	if (address_family == AF_INET && is_inet_addr (address))
 		return TRUE;
 		return TRUE;
-	else if (address_family == AF_INET6 && is_inet6_addr (address)) 
+	else if (address_family == AF_INET6 && is_inet6_addr (address))
 		return TRUE;
 		return TRUE;
 #else
 #else
 	if (is_inet_addr (address))
 	if (is_inet_addr (address))

+ 2 - 2
plugins/popen.c

@@ -140,7 +140,7 @@ spopen (const char *cmdstring)
 	/* there cannot be more args than characters */
 	/* there cannot be more args than characters */
 	argc = strlen (cmdstring) + 1;	/* add 1 for NULL termination */
 	argc = strlen (cmdstring) + 1;	/* add 1 for NULL termination */
 	argv = malloc (sizeof(char*)*argc);
 	argv = malloc (sizeof(char*)*argc);
-	
+
 	if (argv == NULL) {
 	if (argv == NULL) {
 		printf ("%s\n", _("Could not malloc argv array in popen()"));
 		printf ("%s\n", _("Could not malloc argv array in popen()"));
 		return NULL;
 		return NULL;
@@ -165,7 +165,7 @@ spopen (const char *cmdstring)
 		}
 		}
 		else if (strcspn(str,"'") < strcspn (str, " \t\r\n")) {
 		else if (strcspn(str,"'") < strcspn (str, " \t\r\n")) {
 										/* handle --option='foo bar' strings */
 										/* handle --option='foo bar' strings */
-			tmp = str + strcspn(str, "'") + 1; 
+			tmp = str + strcspn(str, "'") + 1;
 			if (!strstr (tmp, "'"))
 			if (!strstr (tmp, "'"))
 				return NULL;						/* balanced? */
 				return NULL;						/* balanced? */
 			tmp += strcspn(tmp,"'") + 1;
 			tmp += strcspn(tmp,"'") + 1;

+ 2 - 2
plugins/urlize.c

@@ -79,7 +79,7 @@ main (int argc, char **argv)
 
 
 	while (1) {
 	while (1) {
 		c = getopt_long (argc, argv, "+hVu:", longopts, &option);
 		c = getopt_long (argc, argv, "+hVu:", longopts, &option);
-		
+
 		if (c == -1 || c == EOF)
 		if (c == -1 || c == EOF)
 			break;
 			break;
 
 
@@ -144,7 +144,7 @@ main (int argc, char **argv)
 	printf ("%s", nstr);
 	printf ("%s", nstr);
 	printf ("</A>");
 	printf ("</A>");
 	nstr = strtok(NULL, PERF_CHARACTER);
 	nstr = strtok(NULL, PERF_CHARACTER);
-	if (nstr != NULL) 
+	if (nstr != NULL)
 		printf (" | %s", nstr);
 		printf (" | %s", nstr);
 
 
 	/* close the pipe */
 	/* close the pipe */