]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
btrfs-util: Remove bogus assert()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 10 Oct 2022 13:45:24 +0000 (15:45 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 15 Nov 2022 19:07:54 +0000 (20:07 +0100)
If size is zero, BTRFS_IOC_CLONE_RANGE will copy until the end of
the source file.

src/shared/btrfs-util.c

index 92a9bcde4f7d7a8d50c1e03794b7e0056853ca99..4574a7899e1cfd3eaa67240ac9f62201c5af8707 100644 (file)
@@ -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)