Blame SOURCES/0005-Clarify-a-comment-in-dmi_memory_device_extended_size.patch

94a757
From 5696fa33e5f9fce843fa3b5972b87a705fed2067 Mon Sep 17 00:00:00 2001
94a757
From: Jean Delvare <jdelvare@suse.de>
94a757
Date: Wed, 7 Sep 2016 22:16:16 +0200
94a757
Subject: [PATCH 5/9] Clarify a comment in dmi_memory_device_extended_size
94a757
94a757
Improve the comment to avoid the confusion as reported in bug #48723:
94a757
http://savannah.nongnu.org/bugs/?48723
94a757
---
94a757
 dmidecode.c | 5 ++++-
94a757
 1 file changed, 4 insertions(+), 1 deletion(-)
94a757
94a757
diff --git a/dmidecode.c b/dmidecode.c
94a757
index f56d0c5..f929b28 100644
94a757
--- a/dmidecode.c
94a757
+++ b/dmidecode.c
94a757
@@ -2277,7 +2277,10 @@ static void dmi_memory_device_extended_size(u32 code)
94a757
 {
94a757
	code &= 0x7FFFFFFFUL;
94a757
94a757
-	/* Use the most suitable unit depending on size */
94a757
+	/*
94a757
+	 * Use the greatest unit for which the exact value can be displayed
94a757
+	 * as an integer without rounding
94a757
+	 */
94a757
	if (code & 0x3FFUL)
94a757
		printf(" %lu MB", (unsigned long)code);
94a757
	else if (code & 0xFFFFFUL)
94a757
--
94a757
2.10.2