]> arthur.barton.de Git - bup.git/commit
restore: fix --sparse fix (find_non_sparse_end) 0.27.1-rc2
authorRob Browning <rlb@defaultvalue.org>
Thu, 12 May 2016 01:06:43 +0000 (20:06 -0500)
committerRob Browning <rlb@defaultvalue.org>
Thu, 12 May 2016 01:06:43 +0000 (20:06 -0500)
commit0cfb6af7222ffba59e9a74c5105e0b5a9d89c678
tree3aa584be19e6edeab3e1024dd74e8bef3235e141
parent1c6997fe8fe84166b8898501ccc935ea4f24d756
restore: fix --sparse fix (find_non_sparse_end)

The previous version of find_non_sparse_end was broken and would
eventually fail when running the randomized tests.  Fix it.

In the process, move the identification of trailing zero runs to a
find_trailing_zeros() function, rename find_end_of_zero_run() to
find_not_zero(), and augment the sanity checking.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c