svn commit: r190600 - in head/sys: amd64/amd64 i386/i386

Jung-uk Kim jkim at FreeBSD.org
Tue Mar 31 14:14:06 PDT 2009


Author: jkim
Date: Tue Mar 31 21:14:05 2009
New Revision: 190600
URL: http://svn.freebsd.org/changeset/base/190600

Log:
  Fix an uninitialized variable from the previous commit.

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==============================================================================
--- head/sys/amd64/amd64/machdep.c	Tue Mar 31 21:02:55 2009	(r190599)
+++ head/sys/amd64/amd64/machdep.c	Tue Mar 31 21:14:05 2009	(r190600)
@@ -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);

Modified: head/sys/i386/i386/machdep.c
==============================================================================
--- head/sys/i386/i386/machdep.c	Tue Mar 31 21:02:55 2009	(r190599)
+++ head/sys/i386/i386/machdep.c	Tue Mar 31 21:14:05 2009	(r190600)
@@ -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);


More information about the svn-src-all mailing list