aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/machdep.c3
-rw-r--r--sys/i386/i386/machdep.c3
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);