From 0b515981fcfb4ba60d6f01ab604d11e13b85e48f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 16 Sep 2007 21:41:42 +0000 Subject: [PATCH] Changed print_child_argv() to take its prefix message as an arg. --- clientserver.c | 2 +- pipe.c | 2 +- util.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clientserver.c b/clientserver.c index d34f2b25..d16e5617 100644 --- a/clientserver.c +++ b/clientserver.c @@ -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 4508478c..50c78c42 100644 --- 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 1fc31069..b309a8da 100644 --- 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 -- 2.34.1