From: David Schweikert Date: Sat, 10 Oct 2015 10:27:49 +0000 (-0700) Subject: Remove apparently dead code (Ryan C. Underwood) X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ceba6069db9660412b9782782d2fd79d4dd6df;p=fping.git Remove apparently dead code (Ryan C. Underwood) --- diff --git a/src/fping.c b/src/fping.c index 9e9aa5f..47b6181 100644 --- a/src/fping.c +++ b/src/fping.c @@ -316,7 +316,6 @@ char *na_cat( char *name, struct in_addr ipaddr ); void crash_and_burn( char *message ); void errno_crash_and_burn( char *message ); char *get_host_by_address( struct in_addr in ); -void u_sleep( int u_sec ); int recvfrom_wto( int s, char *buf, int len, struct sockaddr *saddr, socklen_t *saddr_len, long timo ); void remove_job( HOST_ENTRY *h ); int send_ping( int s, HOST_ENTRY *h ); @@ -2153,47 +2152,6 @@ char * sprint_tm( int t ) return( buf ); } -/************************************************************ - - Function: u_sleep - -************************************************************* - - Inputs: int u_sec - - Description: - -************************************************************/ - -void u_sleep( int u_sec ) -{ - int nfound; - struct timeval to; - fd_set readset, writeset; - -select_again: - to.tv_sec = u_sec / 1000000; - to.tv_usec = u_sec - ( to.tv_sec * 1000000 ); - - FD_ZERO( &readset ); - FD_ZERO( &writeset ); - - nfound = select( 0, &readset, &writeset, NULL, &to ); - if(nfound < 0) { - if(errno == EINTR) { - /* interrupted system call: redo the select */ - goto select_again; - } - else { - errno_crash_and_burn( "select" ); - } - } - - return; - -} /* u_sleep() */ - - /************************************************************ Function: recvfrom_wto *************************************************************