From 4e4ce82e0a05883c8ec7b6a4b56a684062863fe0 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 31 Mar 2009 21:14:05 +0000 Subject: Fix an uninitialized variable from the previous commit. --- sys/amd64/amd64/machdep.c | 3 ++- sys/i386/i386/machdep.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index ad46a62a0835..f34e8159934d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -231,7 +231,8 @@ cpu_startup(dummy) if (sysenv != NULL) { memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10); freeenv(sysenv); - } + } else + memsize = 0; if (memsize > 0) printf("real memory = %ju (%ju MB)\n", memsize << 10, memsize >> 10); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 2f0f3b9e5419..1d5cb6dbc777 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -278,7 +278,8 @@ cpu_startup(dummy) if (sysenv != NULL) { memsize = (uintmax_t)strtoul(sysenv, (char **)NULL, 10); freeenv(sysenv); - } + } else + memsize = 0; if (memsize > 0) printf("real memory = %ju (%ju MB)\n", memsize << 10, memsize >> 10); -- cgit v1.3