caif: precedence bug
authorDan Carpenter <error27@gmail.com>
Thu, 22 Jul 2010 01:11:31 +0000 (01:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2010 21:14:47 +0000 (14:14 -0700)
Negate has precedence over comparison so the original assert only
checked that "rfml->fragment_size" was larger than 1 or 0.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfrfml.c

index 4b04d25b6a3f2a1c9d93e75d65dc035ae38fc1c1..eb1602022ac0643af4e4ad655c3de4ae42a200f4 100644 (file)
@@ -193,7 +193,7 @@ out:
 
 static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt)
 {
-       caif_assert(!cfpkt_getlen(pkt) < rfml->fragment_size);
+       caif_assert(cfpkt_getlen(pkt) >= rfml->fragment_size);
 
        /* Add info for MUX-layer to route the packet out. */
        cfpkt_info(pkt)->channel_id = rfml->serv.layer.id;