summaryrefslogtreecommitdiff
path: root/memdisk/e820func.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-10 12:48:18 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-13 12:26:59 -0700
commitfb1635c7c11dda0bf9b99877dff4a70ab4ef7f1d (patch)
tree861dbe0045c93c97f9b718fe85681d63e7bea5e9 /memdisk/e820func.c
parent87befcd31d6c93d8fdd7e143b66f834280b69228 (diff)
downloadsyslinux-fb1635c7c11dda0bf9b99877dff4a70ab4ef7f1d.tar.gz
memdisk: make the e820 code compile for debugging again
Make it possible to build e820test again, to debug the e820 code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdisk/e820func.c')
-rw-r--r--memdisk/e820func.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/memdisk/e820func.c b/memdisk/e820func.c
index a6896745..ccfc38ea 100644
--- a/memdisk/e820func.c
+++ b/memdisk/e820func.c
@@ -34,7 +34,7 @@ void e820map_init(void)
{
memset(ranges, 0, sizeof(ranges));
nranges = 1;
- ranges[1].type = -1;
+ ranges[1].type = -1U;
}
static void insertrange_at(int where, uint64_t start,
@@ -51,7 +51,7 @@ static void insertrange_at(int where, uint64_t start,
nranges++;
ranges[nranges].start = 0ULL;
- ranges[nranges].type = (uint32_t)-1;
+ ranges[nranges].type = -1U;
ranges[nranges].extattr = 0;
}
@@ -98,8 +98,7 @@ void insertrange(uint64_t start, uint64_t len, uint32_t type, uint32_t extattr)
oldtype = ranges[0].type;
oldattr = ranges[0].extattr;
while ( i < nranges ) {
- if ( ranges[i].type == oldtype &&
- ranges[i].extattr == oldattr ) {
+ if ( ranges[i].type == oldtype && ranges[i].extattr == oldattr ) {
i++;
} else {
oldtype = ranges[i].type;