[svn-commits] tzafrir: linux/trunk r10021 - /linux/trunk/drivers/dahdi/xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 4 09:05:22 CDT 2011


Author: tzafrir
Date: Mon Jul  4 09:05:19 2011
New Revision: 10021

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10021
Log:
A number of cases of testing for unsigned int < 0

Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_bri.c
    linux/trunk/drivers/dahdi/xpp/card_pri.c

Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10021&r1=10020&r2=10021
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Mon Jul  4 09:05:19 2011
@@ -81,12 +81,12 @@
 	};
 #undef	_E
 	if(is_nt) {
-		if ((state < ST_RESET) || (state > ST_NT_DEACTIVTING))
+		if (state > ST_NT_DEACTIVTING)
 			p = "NT ???";
 		else
 			p = nt_names[state];
 	} else {
-		if ((state < ST_RESET) || (state > ST_TE_LOST_FRAMING))
+		if (state > ST_TE_LOST_FRAMING)
 			p = "TE ???";
 		else
 			p = te_names[state];

Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=10021&r1=10020&r2=10021
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Mon Jul  4 09:05:19 2011
@@ -1934,7 +1934,7 @@
 	BUG_ON(!priv->is_cas);
 	BUG_ON(priv->pri_protocol != PRI_PROTO_E1);
 	XPD_DBG(SIGNAL, xpd, "RBS: RX: data_low=0x%02X\n", data_low);
-	if(pos < 0 || pos >= NUM_CAS_RS_E) {
+	if(pos >= NUM_CAS_RS_E) {
 		XPD_ERR(xpd, "%s: got bad pos=%d [0-%d]\n", __FUNCTION__, pos, NUM_CAS_RS_E);
 		return -EINVAL;
 	}
@@ -1975,7 +1975,7 @@
 	BUG_ON(!priv->is_cas);
 	BUG_ON(priv->pri_protocol != PRI_PROTO_T1);
 	rsnum = regnum - REG_RS1_E;
-	if(rsnum < 0 || rsnum >= 12) {
+	if(rsnum >= 12) {
 		XPD_ERR(xpd, "Bad rsnum=%d\n", rsnum);
 		return 0;
 	}
@@ -2321,7 +2321,7 @@
 	struct PRI_priv_data	*priv;
 	unsigned long		flags;
 	int			len = 0;
-	const static struct {
+	static const struct {
 		byte		bits;
 		const char	*name;
 	} alarm_types[] = {




More information about the svn-commits mailing list