Moved inline functions from rsync.h into ifuncs.h.
[rsync/rsync.git] / util.c
diff --git a/util.c b/util.c
index 1fc3106..7a32025 100644 (file)
--- a/util.c
+++ b/util.c
@@ -21,6 +21,7 @@
  */
 
 #include "rsync.h"
+#include "ifuncs.h"
 
 extern int verbose;
 extern int dry_run;
@@ -90,9 +91,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 +1479,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