Commit ae682c3e authored by Andrew Tridgell's avatar Andrew Tridgell

got rid of some unused variables

parent 99994aef
......@@ -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);
......
......@@ -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;
}
......@@ -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);
}
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment