From ae682c3e115aae1e15811e1411f5e7e3438d3193 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 19 Aug 2000 15:25:05 +0000 Subject: [PATCH] got rid of some unused variables --- authenticate.c | 3 +-- io.c | 17 +---------------- loadparm.c | 4 ---- main.c | 1 - sender.c | 2 -- 5 files changed, 2 insertions(+), 25 deletions(-) diff --git a/authenticate.c b/authenticate.c index f87fceef..30bc53db 100644 --- a/authenticate.c +++ b/authenticate.c @@ -135,7 +135,6 @@ static int get_secret(int module, char *user, char *secret, int len) static char *getpassf(char *filename) { char buffer[100]; - int len=0; int fd=0; STRUCT_STAT st; int ok = 1; @@ -170,7 +169,7 @@ static char *getpassf(char *filename) if (envpw) rprintf(FERROR,"RSYNC_PASSWORD environment variable ignored\n"); buffer[sizeof(buffer)-1]='\0'; - if ( (len=read(fd,buffer,sizeof(buffer)-1)) > 0) + if (read(fd,buffer,sizeof(buffer)-1) > 0) { char *p = strtok(buffer,"\n\r"); close(fd); diff --git a/io.c b/io.c index 20fc2ba3..b469d8be 100644 --- a/io.c +++ b/io.c @@ -39,16 +39,10 @@ extern int verbose; extern int io_timeout; extern struct stats stats; -static int buffer_f_in = -1; static int io_error_fd = -1; static void read_loop(int fd, char *buf, int len); -void setup_readbuffer(int f_in) -{ - buffer_f_in = f_in; -} - static void check_timeout(void) { extern int am_server, am_daemon; @@ -323,11 +317,7 @@ unsigned char read_byte(int f) return c; } - - -/* write len bytes to fd, possibly reading from buffer_f_in if set - in order to unclog the pipe. don't return until all len - bytes have been written */ +/* write len bytes to fd */ static void writefd_unbuffered(int fd,char *buf,int len) { int total = 0; @@ -623,8 +613,3 @@ void io_multiplexing_close(void) io_multiplexing_out = 0; } -void io_close_input(int fd) -{ - buffer_f_in = -1; -} - diff --git a/loadparm.c b/loadparm.c index 0083d1e9..b09dde6b 100644 --- a/loadparm.c +++ b/loadparm.c @@ -77,8 +77,6 @@ struct parm_struct unsigned flags; }; -static BOOL bLoaded = False; - #ifndef GLOBAL_NAME #define GLOBAL_NAME "global" #endif @@ -734,8 +732,6 @@ BOOL lp_load(char *pszFname, int globals_only) iServiceIndex = -1; bRetval = pm_process(n2, globals_only?NULL:do_section, do_parameter); - bLoaded = True; - return (bRetval); } diff --git a/main.c b/main.c index 06c5e9b2..7d04adf6 100644 --- a/main.c +++ b/main.c @@ -356,7 +356,6 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) close(recv_pipe[1]); close(error_pipe[1]); - io_close_input(f_in); if (f_in != f_out) close(f_in); io_start_buffering(f_out); diff --git a/sender.c b/sender.c index dc7da4dc..d2ab1b34 100644 --- a/sender.c +++ b/sender.c @@ -97,8 +97,6 @@ void send_files(struct file_list *flist,int f_out,int f_in) if (verbose > 2) rprintf(FINFO,"send_files starting\n"); - setup_readbuffer(f_in); - while (1) { int offset=0; -- 2.34.1