installer: Use unsigned long for holding hw.physmem's value.
authorSascha Wildner <saw@online.de>
Thu, 5 Feb 2009 22:21:18 +0000 (23:21 +0100)
committerSascha Wildner <saw@online.de>
Thu, 5 Feb 2009 22:21:52 +0000 (23:21 +0100)
The previous signed long led to the wrong calculation of default swap size
on machines with >2GB main memory.

Reported-by: corecode
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1257>

contrib/bsdinstaller-1.1.6/src/lib/libinstaller/survey.c

index f8072d0..a1df601 100644 (file)
@@ -141,7 +141,7 @@ parse_slice_info(char *line, int *slice,
 int
 survey_storage(struct i_fn_args *a)
 {
-       long mem = 0;
+       unsigned long mem = 0;
        char disks[256], line[256];
        char *disk, *disk_ptr;
        struct commands *cmds;