A change that wasn't needed.
[rsync/rsync.git] / io.c
diff --git a/io.c b/io.c
index 36d5f1b..16955a0 100644 (file)
--- a/io.c
+++ b/io.c
@@ -270,7 +270,6 @@ static int read_timeout(int fd, char *buf, size_t len)
                        continue;
                }
 
-
                if (io_error_fd != -1 && FD_ISSET(io_error_fd, &r_fds)) {
                        read_error_fd();
                }
@@ -375,8 +374,7 @@ int read_filesfrom_line(int fd, char *fname)
        extern int io_timeout;
        extern int eol_nulls;
        extern char *remote_filesfrom_file;
-       extern int am_server;
-       int reading_remotely = remote_filesfrom_file || (am_server && fd == 0);
+       int reading_remotely = remote_filesfrom_file != NULL;
        int nulls = eol_nulls || reading_remotely;
 
   start:
@@ -408,8 +406,8 @@ int read_filesfrom_line(int fd, char *fname)
        }
        *s = '\0';
 
-       /* Dump comments. */
-       if (*fname == '#' || *fname == ';')
+       /* Dump comments if reading locally. */
+       if (!reading_remotely && (*fname == '#' || *fname == ';'))
                goto start;
 
        return s - fname;
@@ -688,7 +686,7 @@ void io_start_buffering(int fd)
 {
        if (io_buffer) return;
        multiplex_out_fd = fd;
-       io_buffer = (char *)malloc(IO_BUFFER_SIZE);
+       io_buffer = new_array(char, IO_BUFFER_SIZE);
        if (!io_buffer) out_of_memory("writefd");
        io_buffer_count = 0;
 }