[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

duplicate flag checks

From: Glen Kaukola
Subject: duplicate flag checks
Date: Wed, 08 Dec 2004 00:03:58 -0800
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)

Hi there,

I was kinda wondering about some of the laden code, more specifically in the ia32-cmain.c file. In the cmain function I'm seeing this:
if (!CHECK_FLAG (mbi->flags, 0) && !CHECK_FLAG (mbi->flags, 6))
    panic ("Bootloader did not provide a memory map");

But then later on in the find_components and debug_dump functions I see the exact same checks. So maybe I'm missing something here, but why not just check them once and be done with it? Or maybe the reasoning is that the compiler will just optimize it all away anyway?

Any insight into this would be appreciated.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]