diff options
Diffstat (limited to 'image')
-rw-r--r-- | image/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/image/main.c b/image/main.c index 9c75c8b4..5f155c23 100644 --- a/image/main.c +++ b/image/main.c @@ -119,11 +119,11 @@ static struct extent_buffer *alloc_dummy_eb(u64 bytenr, u32 size); static void csum_block(u8 *buf, size_t len) { - u8 result[BTRFS_CRC32_SIZE]; + u8 result[btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32]]; u32 crc = ~(u32)0; crc = crc32c(crc, buf + BTRFS_CSUM_SIZE, len - BTRFS_CSUM_SIZE); btrfs_csum_final(crc, result); - memcpy(buf, result, BTRFS_CRC32_SIZE); + memcpy(buf, result, btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32]); } static int has_name(struct btrfs_key *key) |