File dmidecode-print-type-33-name-unconditionally.patch of Package dmidecode.28623

From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 23 Mar 2020 16:47:20 +0100
Subject: dmidecode: Print type 33 name unconditionally
Git-commit: 65438a7ec0f4cddccf810136da6f280bd148af71
Patch-mainline: 3.3

Even if a type 33 structure is too short, we can still display its
type name as we do for all other structure types.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 dmidecode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/dmidecode.c
+++ b/dmidecode.c
@@ -4812,8 +4812,8 @@ static void dmi_decode(const struct dmi_
 			break;
 
 		case 33: /* 7.34 64-bit Memory Error Information */
-			if (h->length < 0x1F) break;
 			printf("64-bit Memory Error Information\n");
+			if (h->length < 0x1F) break;
 			printf("\tType: %s\n",
 				dmi_memory_error_type(data[0x04]));
 			printf("\tGranularity: %s\n",
openSUSE Build Service is sponsored by