This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-lhv2
in repository gfs2-utils.
commit e4fa506b8ef9a562af464f1c8f72d6b8ad76b700
Author: Andrew Price <anprice(a)redhat.com>
Date: Mon Jan 22 12:45:35 2018 +0000
libgfs2: Don't use messy sizeof()s for calculating crc offsets
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/structures.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index f6abd89..dd1d962 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -118,8 +118,7 @@ uint32_t lgfs2_log_header_crc(char *buf, unsigned bsize)
const off_t v1_end = offsetof(struct gfs2_log_header, lh_hash) + 4;
const unsigned char *lb = (const unsigned char *)buf;
- return crc32c(~0, lb + v1_end + sizeof(((struct gfs2_log_header*)0)->lh_crc),
- bsize - v1_end - sizeof(((struct gfs2_log_header*)0)->lh_crc));
+ return crc32c(~0, lb + v1_end + 4, bsize - v1_end - 4);
#else
return 0;
#endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date