Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Mar 2012 14:03:17 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233748 - head/sys/sparc64/sparc64
Message-ID:  <201203311403.q2VE3HRP005098@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sat Mar 31 14:03:16 2012
New Revision: 233748
URL: http://svn.freebsd.org/changeset/base/233748

Log:
  Remove checks that are redundant due to tf_type being unsigned.
  
  MFC after:	3 days

Modified:
  head/sys/sparc64/sparc64/trap.c

Modified: head/sys/sparc64/sparc64/trap.c
==============================================================================
--- head/sys/sparc64/sparc64/trap.c	Sat Mar 31 13:56:24 2012	(r233747)
+++ head/sys/sparc64/sparc64/trap.c	Sat Mar 31 14:03:16 2012	(r233748)
@@ -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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203311403.q2VE3HRP005098>