dmidecode/dmidecode-1.173-drop-cast.patch

19 lines
478 B
Diff
Raw Normal View History

Subject: Drop unneeded and possibly dangerous cast
Upstream: yes, 1.173
---
dmidecode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- dmidecode-2.12.orig/dmidecode.c
+++ dmidecode-2.12/dmidecode.c
@@ -2236,7 +2236,7 @@ static void dmi_memory_voltage_value(u16
if (code == 0)
printf(" Unknown");
else
- printf(" %.3f V", (float)(i16)code / 1000);
+ printf(" %.3f V", (float)code / 1000);
}
static const char *dmi_memory_device_form_factor(u8 code)