From ecc646cea8b36d7256447311cfb7187c06600d41 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 28 Aug 2020 18:58:55 +0200 Subject: [PATCH 20/22] gcc: calc size in compile time --- lib/device/dev-md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/device/dev-md.c b/lib/device/dev-md.c index 23ce41a..8fe7fc3 100644 --- a/lib/device/dev-md.c +++ b/lib/device/dev-md.c @@ -50,7 +50,7 @@ static int _dev_has_md_magic(struct device *dev, uint64_t sb_offset) } #define IMSM_SIGNATURE "Intel Raid ISM Cfg Sig. " -#define IMSM_SIG_LEN (strlen(IMSM_SIGNATURE)) +#define IMSM_SIG_LEN (sizeof(IMSM_SIGNATURE) - 1) static int _dev_has_imsm_magic(struct device *dev, uint64_t devsize_sectors) { -- 2.27.0