[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Mon Jul 27 21:00:30 UTC 2020


The branch, master has been updated
       via  3714084f Mention an implied option.
       via  eb2c3a5e Replace a couple calloc() calls with new_array0().
      from  f6967eca Complain about a missing/non-dir `--temp-dir`.

https://git.samba.org/?p=rsync.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3714084f4806e6d23fccea1b88e8e4821a1d39d7
Author: Wayne Davison <wayne at opencoder.net>
Date:   Mon Jul 27 13:49:19 2020 -0700

    Mention an implied option.

commit eb2c3a5e18575f493e263921cf2e8829a373a20b
Author: Wayne Davison <wayne at opencoder.net>
Date:   Sun Jul 26 23:30:50 2020 -0700

    Replace a couple calloc() calls with new_array0().

-----------------------------------------------------------------------

Summary of changes:
 rsync.1.md | 3 +++
 util.c     | 8 +++-----
 2 files changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/rsync.1.md b/rsync.1.md
index 18afe102..6c2b565a 100644
--- a/rsync.1.md
+++ b/rsync.1.md
@@ -2959,6 +2959,9 @@ your home directory (remove the '=' for that).
     can do if you want rsync to cleanup old `.~tmp~` dirs that might be lying
     around.  Conflicts with `--inplace` and `--append`.
 
+    This option implies `--no-inc-recursive` since it needs the full file list
+    in memory in order to be able to iterate over it at the end.
+
     This option uses more memory on the receiving side (one bit per file
     transferred) and also requires enough free disk space on the receiving side
     to hold an additional copy of all the updated files.  Note also that you
diff --git a/util.c b/util.c
index f5588324..b2b19892 100644
--- a/util.c
+++ b/util.c
@@ -1510,7 +1510,7 @@ struct bitbag *bitbag_create(int max_ndx)
 	struct bitbag *bb = new(struct bitbag);
 	bb->slot_cnt = (max_ndx + BB_PER_SLOT_BITS - 1) / BB_PER_SLOT_BITS;
 
-	bb->bits = (uint32**)calloc(bb->slot_cnt, sizeof (uint32*));
+	bb->bits = new_array0(uint32*, bb->slot_cnt);
 
 	return bb;
 }
@@ -1520,10 +1520,8 @@ void bitbag_set_bit(struct bitbag *bb, int ndx)
 	int slot = ndx / BB_PER_SLOT_BITS;
 	ndx %= BB_PER_SLOT_BITS;
 
-	if (!bb->bits[slot]) {
-		if (!(bb->bits[slot] = (uint32*)calloc(BB_PER_SLOT_INTS, 4)))
-			out_of_memory("bitbag_set_bit");
-	}
+	if (!bb->bits[slot])
+		bb->bits[slot] = new_array0(uint32, BB_PER_SLOT_INTS);
 
 	bb->bits[slot][ndx/32] |= 1u << (ndx % 32);
 }


-- 
The rsync repository.



More information about the rsync-cvs mailing list