summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/card_pri.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-07-04 14:05:19 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-07-04 14:05:19 +0000
commit8744526c56a08e20aeeea848a5873c048f2644c0 (patch)
treed07337b1eacce981020a0d799a9679d1d4213553 /drivers/dahdi/xpp/card_pri.c
parentf9dbecb486d1ff041ad35e0e29a026bd71e8db83 (diff)
A number of cases of testing for unsigned int < 0
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10021 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/card_pri.c')
-rw-r--r--drivers/dahdi/xpp/card_pri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c
index 604163a..ad39f18 100644
--- a/drivers/dahdi/xpp/card_pri.c
+++ b/drivers/dahdi/xpp/card_pri.c
@@ -1934,7 +1934,7 @@ static int decode_cas_e1(xpd_t *xpd, byte regnum, byte data_low)
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 @@ static int decode_cas_t1(xpd_t *xpd, byte regnum, byte data_low)
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 @@ static DEVICE_ATTR_READER(pri_alarms_show, dev, buf)
struct PRI_priv_data *priv;
unsigned long flags;
int len = 0;
- const static struct {
+ static const struct {
byte bits;
const char *name;
} alarm_types[] = {