From c93b0efdb9ee8e8a68ba323785a69f8c0f874276 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 10 Oct 2022 15:45:24 +0200 Subject: [PATCH] btrfs-util: Remove bogus assert() If size is zero, BTRFS_IOC_CLONE_RANGE will copy until the end of the source file. --- src/shared/btrfs-util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shared/btrfs-util.c b/src/shared/btrfs-util.c index 92a9bcde4f7..4574a7899e1 100644 --- a/src/shared/btrfs-util.c +++ b/src/shared/btrfs-util.c @@ -245,7 +245,6 @@ int btrfs_clone_range(int infd, uint64_t in_offset, int outfd, uint64_t out_offs assert(infd >= 0); assert(outfd >= 0); - assert(sz > 0); r = fd_verify_regular(outfd); if (r < 0) -- 2.47.3