From 52162700bb59663add809a6465ce2769d80b3664 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 17 Jan 2013 11:54:47 -0800 Subject: btrfs-progs: treat super.magic as an le64 The super block magic is a le64 whose value looks like an unterminated string in memory. The lack of null termination leads to clumsy use of string functions and causes static analysis tools to warn that the string will be unterminated. So let's just treat it as the le64 that it is. Endian wrappers are used on the constant so that they're compiled into run-time constants. Signed-off-by: Zach Brown --- ctree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctree.h') diff --git a/ctree.h b/ctree.h index d0f6062f..18b68e1b 100644 --- a/ctree.h +++ b/ctree.h @@ -28,7 +28,7 @@ struct btrfs_root; struct btrfs_trans_handle; -#define BTRFS_MAGIC "_BHRfS_M" +#define BTRFS_MAGIC 0x4D5F53665248425F /* ascii _BHRfS_M, no null */ #define BTRFS_MAX_LEVEL 8 -- cgit v1.2.3