diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-11-19 06:45:18 +0000 |
commit | caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe (patch) | |
tree | 118fd80cc8ba27ef695a8e8ce409e5d70f4fa451 /plugins-root | |
parent | 16f53e0717b60660145388b0feb351628f606211 (diff) | |
download | monitoring-plugins-caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe.tar.gz |
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
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_dhcp.c | 38 | ||||
-rw-r--r-- | plugins-root/check_icmp.c | 2 | ||||
-rw-r--r-- | plugins-root/pst3.c | 24 |
3 files changed, 32 insertions, 32 deletions
diff --git a/plugins-root/check_dhcp.c b/plugins-root/check_dhcp.c index 5781f758..35874a93 100644 --- a/plugins-root/check_dhcp.c +++ b/plugins-root/check_dhcp.c @@ -79,8 +79,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #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 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; #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 @@ dhcp_offer *dhcp_offer_list=NULL; 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 @@ int get_hardware_address(int sock,char *interface_name){ 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 @@ int send_dhcp_discover(int sock){ /* 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 @@ int get_dhcp_offer(int sock){ if((current_time-start_time)>=dhcpoffer_timeout) break; - if(verbose) + if(verbose) printf("\n\n"); bzero(&source,sizeof(source)); @@ -581,7 +581,7 @@ int get_dhcp_offer(int sock){ continue; } else{ - if(verbose) + if(verbose) printf(_("Result=OK\n")); responses++; @@ -626,7 +626,7 @@ int get_dhcp_offer(int sock){ 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 @@ 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)); - if(verbose) + if(verbose) printf(_("send_dhcp_packet result: %d\n"),result); if(result<0) @@ -853,7 +853,7 @@ int add_dhcp_offer(struct in_addr source,dhcp_packet *offer_packet){ /* 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 @@ int get_results(void){ 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 call_getopt(int argc, char **argv){ 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 @@ static int dl_bind(int fd, int sap, u_char *addr){ /*********************************************************************** * 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 diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index ff6c73b3..cc3f3d59 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -1313,7 +1313,7 @@ print_help(void) 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")); diff --git a/plugins-root/pst3.c b/plugins-root/pst3.c index b275a6bc..85136569 100644 --- a/plugins-root/pst3.c +++ b/plugins-root/pst3.c @@ -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 @@ int main (int argc, char **argv) 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 @@ try_again: 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 @@ try_again: ); free(procname); - /* + /* * and now for the command line stuff */ @@ -195,18 +195,18 @@ try_again: 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 */ |