summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2013-04-23 15:06:23 +0000
committerkhali <khali>2013-04-23 15:06:23 +0000
commitd6cdb1049ea678cba5cbc74633eecd3c19c14060 (patch)
treee056b44117e2af81555f90e7a0c6866b01c4132f
parenta0ed0468a3e3899c9818b1a977d2fd6b9c86a3de (diff)
downloaddmidecode-d6cdb1049ea678cba5cbc74633eecd3c19c14060.tar.gz
Drop unneeded and possibly dangerous cast.
Not that I really expect memory modules running above 32 V...
-rw-r--r--Makefile2
-rw-r--r--dmidecode.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 55378bb..111ada7 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
# When debugging, disable -O2 and enable -g.
CFLAGS += -O2
-#CFLAGS += -g
+CFLAGS += -g
# Pass linker flags here
LDFLAGS =
diff --git a/dmidecode.c b/dmidecode.c
index 928cbdb..366654a 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -2236,7 +2236,7 @@ static void dmi_memory_voltage_value(u16 code)
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)