Changed print_child_argv() to take its prefix message as an arg.
authorWayne Davison <wayned@samba.org>
Sun, 16 Sep 2007 21:41:42 +0000 (21:41 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 16 Sep 2007 21:41:42 +0000 (21:41 +0000)
clientserver.c
pipe.c
util.c

index d34f2b2..d16e561 100644 (file)
@@ -242,7 +242,7 @@ int start_inband_exchange(int f_in, int f_out, const char *user, int argc, char
        sargs[sargc] = NULL;
 
        if (verbose > 1)
-               print_child_argv(sargs);
+               print_child_argv("sending daemon args:", sargs);
 
        p = strchr(path, '/');
        if (p) *p = '\0';
diff --git a/pipe.c b/pipe.c
index 4508478..50c78c4 100644 (file)
--- a/pipe.c
+++ b/pipe.c
@@ -50,7 +50,7 @@ pid_t piped_child(char **command, int *f_in, int *f_out)
        int from_child_pipe[2];
 
        if (verbose >= 2)
-               print_child_argv(command);
+               print_child_argv("opening connection using:", command);
 
        if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) {
                rsyserr(FERROR, errno, "pipe");
diff --git a/util.c b/util.c
index 1fc3106..b309a8d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -90,9 +90,9 @@ int fd_pair(int fd[2])
        return ret;
 }
 
-void print_child_argv(char **cmd)
+void print_child_argv(const char *prefix, char **cmd)
 {
-       rprintf(FCLIENT, "opening connection using ");
+       rprintf(FCLIENT, "%s ", prefix);
        for (; *cmd; cmd++) {
                /* Look for characters that ought to be quoted.  This
                * is not a great quoting algorithm, but it's
@@ -1478,7 +1478,7 @@ void *expand_item_list(item_list *lp, size_t item_size,
                void *new_ptr;
                size_t new_size = lp->malloced;
                if (incr < 0)
-                       new_size -= incr; /* increase slowly */
+                       new_size += -incr; /* increase slowly */
                else if (new_size < (size_t)incr)
                        new_size += incr;
                else