Blame SOURCES/0006-Prevent-static-code-analyzer-confusion.patch

94a757
From 0b5c47c64b6fb3b626c5f75d9dc36bc864907fca Mon Sep 17 00:00:00 2001
94a757
From: Jean Delvare <jdelvare@suse.de>
94a757
Date: Wed, 7 Sep 2016 22:16:20 +0200
94a757
Subject: [PATCH 6/9] Prevent static code analyzer confusion
94a757
94a757
As reported in bug #48723:
94a757
http://savannah.nongnu.org/bugs/?48723
94a757
94a757
This is a false positive and the static code analyzer output should
94a757
be made clearer. Nevertheless we can write the code differently so
94a757
that it doesn't trigger a warning.
94a757
---
94a757
 dmidecode.c | 2 +-
94a757
 1 file changed, 1 insertion(+), 1 deletion(-)
94a757
94a757
diff --git a/dmidecode.c b/dmidecode.c
94a757
index f929b28..3993592 100644
94a757
--- a/dmidecode.c
94a757
+++ b/dmidecode.c
94a757
@@ -2283,7 +2283,7 @@ static void dmi_memory_device_extended_size(u32 code)
94a757
	 */
94a757
	if (code & 0x3FFUL)
94a757
		printf(" %lu MB", (unsigned long)code);
94a757
-	else if (code & 0xFFFFFUL)
94a757
+	else if (code & 0xFFC00UL)
94a757
		printf(" %lu GB", (unsigned long)code >> 10);
94a757
	else
94a757
		printf(" %lu TB", (unsigned long)code >> 20);
94a757
--
94a757
2.10.2