boot: Fix some always false conditions

This commit is contained in:
Lioncash
2014-09-26 20:56:04 +02:00
committed by François Revol
parent 907046dc4d
commit a4a9dade68
3 changed files with 6 additions and 6 deletions
@@ -283,7 +283,7 @@ translate_color(int32 color)
15, 4, 2, 6, 1, 5, 3, 7,
8, 12, 10, 14, 9, 13, 11, 0 };
if (color < 0 && color >= 16)
if (color < 0 || color >= 16)
return 0;
return cmap[color];
//return color;
+3 -3
View File
@@ -71,11 +71,11 @@ check_cpu_features()
fpu = 68060;
else if (fpu_type & 0x8)
fpu = 68040;
else if (fpu_type & 0x6 == 0x6)
else if ((fpu_type & 0x6) == 0x6)
fpu = 68882;
else if (fpu_type & 0x6 == 0x4)
else if ((fpu_type & 0x6) == 0x4)
fpu = 68881;
else if (fpu_type & 0x6 == 0x2)
else if ((fpu_type & 0x6) == 0x2)
fpu = 68881; // not certain
else if (fpu_type & 0x4) {
panic("bad fpu");
+2 -2
View File
@@ -77,9 +77,9 @@ VTConsole::SetColor(int32 foreground, int32 background)
8, 12, 10, 14, 9, 13, 11, 0 };
char buff[] = "\033b \033c ";
if (foreground < 0 && foreground >= 16)
if (foreground < 0 || foreground >= 16)
return;
if (background < 0 && background >= 16)
if (background < 0 || background >= 16)
return;
buff[2] += cmap[foreground];