]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix harmless sparse endian nit
authorEric Sandeen <sandeen@redhat.com>
Wed, 29 Oct 2014 05:33:15 +0000 (16:33 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Oct 2014 05:33:15 +0000 (16:33 +1100)
h_crc is __le32 but cpu_to_be32() is... __be32.  So sparse
complains, even though it's harmless.

Although sparse is smart about bare 0s, and we could
drop the swap, other places explicitly swap to keep
things clear (I guess?) so "swap" the 0 with the proper
routine.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/rdwr.c

index 80de6fa17289e9b61cf6f05218b19058b03b6d98..7d734776964f73775208f02e035ec3518f05c4b6 100644 (file)
@@ -187,7 +187,7 @@ libxfs_log_header(
                head->h_len = cpu_to_be32(sunit - BBSIZE);
        else
                head->h_len = cpu_to_be32(20);
-       head->h_crc = cpu_to_be32(0);
+       head->h_crc = cpu_to_le32(0);
        head->h_prev_block = cpu_to_be32(-1);
        head->h_num_logops = cpu_to_be32(1);
        head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0);