Remove checks that are redundant due to tf_type being unsigned.

MFC after:	3 days
This commit is contained in:
Marius Strobl 2012-03-31 14:03:16 +00:00
parent 2cc3538245
commit 3e1745a769
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233748

View File

@ -301,7 +301,7 @@ trap(struct trapframe *tf)
sig = trap_cecc();
break;
default:
if (tf->tf_type < 0 || tf->tf_type > T_MAX)
if (tf->tf_type > T_MAX)
panic("trap: bad trap type %#lx (user)",
tf->tf_type);
else if (trap_sig[tf->tf_type] == -1)
@ -405,7 +405,7 @@ trap(struct trapframe *tf)
if (error != 0) {
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)",
tf->tf_type);
panic("trap: %s (kernel)", trap_msg[tf->tf_type]);