Remove checks that are redundant due to tf_type being unsigned.
MFC after: 3 days
This commit is contained in:
parent
2cc3538245
commit
3e1745a769
@ -301,7 +301,7 @@ trap(struct trapframe *tf)
|
|||||||
sig = trap_cecc();
|
sig = trap_cecc();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (tf->tf_type < 0 || tf->tf_type > T_MAX)
|
if (tf->tf_type > T_MAX)
|
||||||
panic("trap: bad trap type %#lx (user)",
|
panic("trap: bad trap type %#lx (user)",
|
||||||
tf->tf_type);
|
tf->tf_type);
|
||||||
else if (trap_sig[tf->tf_type] == -1)
|
else if (trap_sig[tf->tf_type] == -1)
|
||||||
@ -405,7 +405,7 @@ trap(struct trapframe *tf)
|
|||||||
|
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
tf->tf_type &= ~T_KERNEL;
|
tf->tf_type &= ~T_KERNEL;
|
||||||
if (tf->tf_type < 0 || tf->tf_type > T_MAX)
|
if (tf->tf_type > T_MAX)
|
||||||
panic("trap: bad trap type %#lx (kernel)",
|
panic("trap: bad trap type %#lx (kernel)",
|
||||||
tf->tf_type);
|
tf->tf_type);
|
||||||
panic("trap: %s (kernel)", trap_msg[tf->tf_type]);
|
panic("trap: %s (kernel)", trap_msg[tf->tf_type]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user