Use the f_name_to() function to avoid having to strdup() the name that
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index a7cf981..1b0cd8b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -171,7 +171,7 @@ static void show_malloc_stats(void)
 
        mi = mallinfo();
 
-       rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
+       rprintf(FINFO, "\n" RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
                getpid(),
                am_server ? "server " : "",
                am_daemon ? "daemon " : "",
@@ -243,17 +243,13 @@ static pid_t do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int
                args[argc++] = rsync_path;
 
                if (blocking_io < 0) {
-                       char *cp = getenv(RSYNC_RSH_IO_ENV);
-                       if (rsh_env && cp && strcmp(cmd, rsh_env) == 0)
-                               blocking_io = *cp == 'b' || *cp == 'B';
-                       else {
-                               if ((cp = strrchr(cmd, '/')) != NULL)
-                                       cp++;
-                               else
-                                       cp = cmd;
-                               if (strcmp(cp, "rsh") == 0 || strcmp(cp, "remsh") == 0)
-                                       blocking_io = 1;
-                       }
+                       char *cp;
+                       if ((cp = strrchr(cmd, '/')) != NULL)
+                               cp++;
+                       else
+                               cp = cmd;
+                       if (strcmp(cp, "rsh") == 0 || strcmp(cp, "remsh") == 0)
+                               blocking_io = 1;
                }
 
                server_options(args,&argc);
@@ -389,8 +385,8 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
        report(f_out);
        if (protocol_version >= 24) {
                /* final goodbye message */
-               read_int(f_in);
-       }
+               read_int(f_in);
+       }
        io_flush();
        exit_cleanup(0);
 }
@@ -616,7 +612,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
                        send_exclude_list(f_out);
                if (remote_filesfrom_file)
                        filesfrom_fd = f_in;
-               if (!read_batch) /*  dw -- don't write to pipe */
+               if (!read_batch) /* don't write to pipe */
                        flist = send_file_list(f_out,argc,argv);
                if (verbose > 3)
                        rprintf(FINFO,"file list sent\n");