kernel: fix sanity check
This commit is contained in:
parent
4c6c911fdc
commit
dcff984d6a
1 changed files with 2 additions and 2 deletions
|
@ -87,9 +87,9 @@ int overlaps(multiboot_module_t *mod, int n, int cmp_mod)
|
||||||
multiboot_module_t *cmp = &mod[cmp_mod];
|
multiboot_module_t *cmp = &mod[cmp_mod];
|
||||||
int m;
|
int m;
|
||||||
|
|
||||||
#define INRANGE(mod, v) ((v) >= mod->mod_start && (v) <= thismod->mod_end)
|
#define INRANGE(mod, v) ((v) >= mod->mod_start && (v) < mod->mod_end)
|
||||||
#define OVERLAP(mod1, mod2) (INRANGE(mod1, mod2->mod_start) || \
|
#define OVERLAP(mod1, mod2) (INRANGE(mod1, mod2->mod_start) || \
|
||||||
INRANGE(mod1, mod2->mod_end))
|
INRANGE(mod1, mod2->mod_end-1))
|
||||||
for(m = 0; m < n; m++) {
|
for(m = 0; m < n; m++) {
|
||||||
multiboot_module_t *thismod = &mod[m];
|
multiboot_module_t *thismod = &mod[m];
|
||||||
if(m == cmp_mod) continue;
|
if(m == cmp_mod) continue;
|
||||||
|
|
Loading…
Reference in a new issue