X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fisdn%2Fhisax%2Fhisax_isac.c;h=d0fefcf999cb7226b89e81c50021cfc1be263ee9;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=f4972f6c1f5d29da36e98b34d8511194f8bdb140;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c index f4972f6c1..d0fefcf99 100644 --- a/drivers/isdn/hisax/hisax_isac.c +++ b/drivers/isdn/hisax/hisax_isac.c @@ -433,7 +433,7 @@ static void l1m_debug(struct FsmInst *fi, char *fmt, ...) char buf[256]; va_start(args, fmt); - vsprintf(buf, fmt, args); + vsnprintf(buf, sizeof(buf), fmt, args); DBG(DBG_L1M, "%s", buf); va_end(args); } @@ -476,12 +476,10 @@ static void isac_fill_fifo(struct isac *isac) unsigned char cmd; u_char *ptr; - if (!isac->tx_skb) - BUG(); + BUG_ON(!isac->tx_skb); count = isac->tx_skb->len; - if (count <= 0) - BUG(); + BUG_ON(count <= 0); DBG(DBG_IRQ, "count %d", count); @@ -859,8 +857,7 @@ void isac_d_l2l1(struct hisax_if *hisax_d_if, int pr, void *arg) dev_kfree_skb(skb); break; } - if (isac->tx_skb) - BUG(); + BUG_ON(isac->tx_skb); isac->tx_skb = skb; isac_fill_fifo(isac);