From: Daan De Meyer Date: Mon, 10 Oct 2022 13:45:24 +0000 (+0200) Subject: btrfs-util: Remove bogus assert() X-Git-Tag: v253-rc1~520^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c93b0efdb9ee8e8a68ba323785a69f8c0f874276;p=thirdparty%2Fsystemd.git btrfs-util: Remove bogus assert() If size is zero, BTRFS_IOC_CLONE_RANGE will copy until the end of the source file. --- 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)