diff for duplicates of <1194910431.9407.53.camel@localhost> diff --git a/a/1.txt b/N1/1.txt index ed708c3..b0beb54 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -17,7 +17,7 @@ index 8d278c8..f023d5b 100644 err = -ENOMEM; ap = kzalloc(sizeof(*ap), GFP_KERNEL); -- if (ap = 0) +- if (ap == 0) + if (!ap) goto out; @@ -26,7 +26,7 @@ index 8d278c8..f023d5b 100644 ap = tty->disc_data; tty->disc_data = NULL; write_unlock_irq(&disc_data_lock); -- if (ap = 0) +- if (ap == 0) + if (!ap) return; @@ -48,14 +48,14 @@ index 8d278c8..f023d5b 100644 int err, val; int __user *p = (int __user *)arg; -- if (ap = 0) +- if (ap == 0) + if (!ap) return -ENXIO; err = -EFAULT; switch (cmd) { case PPPIOCGCHAN: err = -ENXIO; -- if (ap = 0) +- if (ap == 0) + if (!ap) break; err = -EFAULT; @@ -64,7 +64,7 @@ index 8d278c8..f023d5b 100644 case PPPIOCGUNIT: err = -ENXIO; -- if (ap = 0) +- if (ap == 0) + if (!ap) break; err = -EFAULT; @@ -73,7 +73,7 @@ index 8d278c8..f023d5b 100644 struct asyncppp *ap = ap_get(tty); unsigned long flags; -- if (ap = 0) +- if (ap == 0) + if (!ap) return; spin_lock_irqsave(&ap->recv_lock, flags); @@ -82,7 +82,7 @@ index 8d278c8..f023d5b 100644 struct asyncppp *ap = ap_get(tty); clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); -- if (ap = 0) +- if (ap == 0) + if (!ap) return; set_bit(XMIT_WAKEUP, &ap->xmit_flags); @@ -127,19 +127,19 @@ index 8d278c8..f023d5b 100644 n = scan_ordinary(ap, buf, count); f = 0; -- if (flags != 0 && (ap->state & SC_TOSS) = 0) { -+ if (flags && (ap->state & SC_TOSS) = 0) { +- if (flags != 0 && (ap->state & SC_TOSS) == 0) { ++ if (flags && (ap->state & SC_TOSS) == 0) { /* check the flags to see if any char had an error */ for (j = 0; j < n; ++j) if ((f = flags[j]) != 0) @@ -878,9 +878,9 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf, - } else if (n > 0 && (ap->state & SC_TOSS) = 0) { + } else if (n > 0 && (ap->state & SC_TOSS) == 0) { /* stuff the chars in the skb */ skb = ap->rpkt; -- if (skb = 0) { +- if (skb == 0) { + if (!skb) { skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2); -- if (skb = 0) +- if (skb == 0) + if (!skb) goto nomem; ap->rpkt = skb; @@ -164,13 +164,13 @@ index 4b49d0e..4f69037 100644 - if (pf != 0) { + if (pf) { file->private_data = NULL; - if (pf->kind = INTERFACE) { + if (pf->kind == INTERFACE) { ppp = PF_TO_PPP(pf); @@ -398,7 +398,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf, ret = count; -- if (pf = 0) +- if (pf == 0) + if (!pf) return -ENXIO; add_wait_queue(&pf->rwait, &wait); @@ -179,7 +179,7 @@ index 4b49d0e..4f69037 100644 set_current_state(TASK_RUNNING); remove_wait_queue(&pf->rwait, &wait); -- if (skb = 0) +- if (skb == 0) + if (!skb) goto out; @@ -188,12 +188,12 @@ index 4b49d0e..4f69037 100644 struct sk_buff *skb; ssize_t ret; -- if (pf = 0) +- if (pf == 0) + if (!pf) return -ENXIO; ret = -ENOMEM; skb = alloc_skb(count + pf->hdrlen, GFP_KERNEL); -- if (skb = 0) +- if (skb == 0) + if (!skb) goto out; skb_reserve(skb, pf->hdrlen); @@ -202,7 +202,7 @@ index 4b49d0e..4f69037 100644 struct ppp_file *pf = file->private_data; unsigned int mask; -- if (pf = 0) +- if (pf == 0) + if (!pf) return 0; poll_wait(file, &pf->rwait, wait); @@ -216,16 +216,16 @@ index 4b49d0e..4f69037 100644 void __user *argp = (void __user *)arg; int __user *p = argp; -- if (pf = 0) +- if (pf == 0) + if (!pf) return ppp_unattached_ioctl(pf, file, cmd, arg); - if (cmd = PPPIOCDETACH) { + if (cmd == PPPIOCDETACH) { @@ -689,13 +689,13 @@ static int ppp_ioctl(struct inode *inode, struct file *file, val &= 0xffff; } vj = slhc_init(val2+1, val+1); -- if (vj = 0) { +- if (vj == 0) { + if (!vj) { printk(KERN_ERR "PPP: no memory (VJ compressor)\n"); err = -ENOMEM; @@ -241,7 +241,7 @@ index 4b49d0e..4f69037 100644 if (get_user(unit, p)) break; ppp = ppp_create_interface(unit, &err); -- if (ppp = 0) +- if (ppp == 0) + if (!ppp) break; file->private_data = &ppp->file; @@ -283,14 +283,14 @@ index 4b49d0e..4f69037 100644 - if (ppp->dev != 0) { + if (ppp->dev) { ppp_push(ppp); -- while (ppp->xmit_pending = 0 +- while (ppp->xmit_pending == 0 - && (skb = skb_dequeue(&ppp->file.xq)) != 0) + while (!ppp->xmit_pending + && (skb = skb_dequeue(&ppp->file.xq))) ppp_send_frame(ppp, skb); /* If there's no work left to do, tell the core net code that we can accept some more. */ -- if (ppp->xmit_pending = 0 && skb_peek(&ppp->file.xq) = 0) +- if (ppp->xmit_pending == 0 && skb_peek(&ppp->file.xq) == 0) + if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) netif_wake_queue(ppp->dev); } @@ -299,13 +299,13 @@ index 4b49d0e..4f69037 100644 switch (proto) { case PPP_IP: -- if (ppp->vj = 0 || (ppp->flags & SC_COMP_TCP) = 0) -+ if (!ppp->vj || (ppp->flags & SC_COMP_TCP) = 0) +- if (ppp->vj == 0 || (ppp->flags & SC_COMP_TCP) == 0) ++ if (!ppp->vj || (ppp->flags & SC_COMP_TCP) == 0) break; /* try to do VJ TCP header compression */ new_skb = alloc_skb(skb->len + ppp->dev->hard_header_len - 2, GFP_ATOMIC); -- if (new_skb = 0) { +- if (new_skb == 0) { + if (!new_skb) { printk(KERN_ERR "PPP: no memory (VJ comp pkt)\n"); goto drop; @@ -323,16 +323,16 @@ index 4b49d0e..4f69037 100644 struct channel *pch; struct sk_buff *skb = ppp->xmit_pending; -- if (skb = 0) +- if (skb == 0) + if (!skb) return; list = &ppp->channels; @@ -1355,7 +1355,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) - if (flen = len && nfree = 0) + if (flen == len && nfree == 0) bits |= E; - frag = alloc_skb(flen + hdrlen + (flen = 0), GFP_ATOMIC); -- if (frag = 0) + frag = alloc_skb(flen + hdrlen + (flen == 0), GFP_ATOMIC); +- if (frag == 0) + if (!frag) goto noskb; q = skb_put(frag, flen + hdrlen); @@ -358,7 +358,7 @@ index 4b49d0e..4f69037 100644 @@ -1462,7 +1462,7 @@ ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) { ppp_recv_lock(ppp); - /* ppp->dev = 0 means interface is closing down */ + /* ppp->dev == 0 means interface is closing down */ - if (ppp->dev != 0) + if (ppp->dev) ppp_receive_frame(ppp, skb, pch); @@ -368,16 +368,16 @@ index 4b49d0e..4f69037 100644 struct channel *pch = chan->ppp; int proto; -- if (pch = 0 || skb->len = 0) { -+ if (!pch || skb->len = 0) { +- if (pch == 0 || skb->len == 0) { ++ if (!pch || skb->len == 0) { kfree_skb(skb); return; } proto = PPP_PROTO(skb); read_lock_bh(&pch->upl); -- if (pch->ppp = 0 || proto >= 0xc000 || proto = PPP_CCPFRAG) { -+ if (!pch->ppp || proto >= 0xc000 || proto = PPP_CCPFRAG) { +- if (pch->ppp == 0 || proto >= 0xc000 || proto == PPP_CCPFRAG) { ++ if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { /* put it on the channel queue */ skb_queue_tail(&pch->file.rq, skb); /* drop old frames if queue too long */ @@ -391,7 +391,7 @@ index 4b49d0e..4f69037 100644 struct channel *pch = chan->ppp; struct sk_buff *skb; -- if (pch = 0) +- if (pch == 0) + if (!pch) return; @@ -419,21 +419,21 @@ index 4b49d0e..4f69037 100644 */ - if (ppp->rc_state != 0 && (ppp->rstate & SC_DECOMP_RUN) + if (ppp->rc_state && (ppp->rstate & SC_DECOMP_RUN) - && (ppp->rstate & (SC_DC_FERROR | SC_DC_ERROR)) = 0) + && (ppp->rstate & (SC_DC_FERROR | SC_DC_ERROR)) == 0) skb = ppp_decompress_frame(ppp, skb); @@ -1574,13 +1574,13 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) switch (proto) { case PPP_VJC_COMP: /* decompress VJ compressed packets */ -- if (ppp->vj = 0 || (ppp->flags & SC_REJ_COMP_TCP)) +- if (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP)) + if (!ppp->vj || (ppp->flags & SC_REJ_COMP_TCP)) goto err; if (skb_tailroom(skb) < 124 || skb_cloned(skb)) { /* copy to a new sk_buff with more tailroom */ ns = dev_alloc_skb(skb->len + 128); -- if (ns = 0) { +- if (ns == 0) { + if (!ns) { printk(KERN_ERR"PPP: no memory (VJ decomp)\n"); goto err; @@ -442,7 +442,7 @@ index 4b49d0e..4f69037 100644 break; case PPP_VJC_UNCOMP: -- if (ppp->vj = 0 || (ppp->flags & SC_REJ_COMP_TCP)) +- if (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP)) + if (!ppp->vj || (ppp->flags & SC_REJ_COMP_TCP)) goto err; @@ -460,7 +460,7 @@ index 4b49d0e..4f69037 100644 } ns = dev_alloc_skb(obuff_size); -- if (ns = 0) { +- if (ns == 0) { + if (!ns) { printk(KERN_ERR "ppp_decompress_frame: no memory\n"); goto err; @@ -478,7 +478,7 @@ index 4b49d0e..4f69037 100644 struct channel *pch; pch = kzalloc(sizeof(struct channel), GFP_KERNEL); -- if (pch = 0) +- if (pch == 0) + if (!pch) return -ENOMEM; pch->ppp = NULL; @@ -508,7 +508,7 @@ index 4b49d0e..4f69037 100644 { struct channel *pch = chan->ppp; -- if (pch = 0) +- if (pch == 0) + if (!pch) return; /* should never happen */ chan->ppp = NULL; @@ -517,7 +517,7 @@ index 4b49d0e..4f69037 100644 { struct channel *pch = chan->ppp; -- if (pch = 0) +- if (pch == 0) + if (!pch) return; ppp_channel_push(pch); @@ -526,13 +526,13 @@ index 4b49d0e..4f69037 100644 cp = find_compressor(ccp_option[0]); #ifdef CONFIG_KMOD -- if (cp = 0) { +- if (cp == 0) { + if (!cp) { request_module("ppp-compress-%d", ccp_option[0]); cp = find_compressor(ccp_option[0]); } #endif /* CONFIG_KMOD */ -- if (cp = 0) +- if (cp == 0) + if (!cp) goto out; @@ -575,7 +575,7 @@ index 4b49d0e..4f69037 100644 break; if (inbound) { /* we will start receiving compressed packets */ -- if (ppp->rc_state = 0) +- if (ppp->rc_state == 0) + if (!ppp->rc_state) break; if (ppp->rcomp->decomp_init(ppp->rc_state, dp, len, @@ -584,7 +584,7 @@ index 4b49d0e..4f69037 100644 } } else { /* we will soon start sending compressed packets */ -- if (ppp->xc_state = 0) +- if (ppp->xc_state == 0) + if (!ppp->xc_state) break; if (ppp->xcomp->comp_init(ppp->xc_state, dp, len, @@ -598,7 +598,7 @@ index 4b49d0e..4f69037 100644 goto out; ret = -ENOMEM; ce = kmalloc(sizeof(struct compressor_entry), GFP_ATOMIC); -- if (ce = 0) +- if (ce == 0) + if (!ce) goto out; ret = 0; @@ -607,8 +607,8 @@ index 4b49d0e..4f69037 100644 spin_lock(&compressor_list_lock); ce = find_comp_entry(cp->compress_proto); -- if (ce != 0 && ce->comp = cp) { -+ if (ce && ce->comp = cp) { +- if (ce != 0 && ce->comp == cp) { ++ if (ce && ce->comp == cp) { list_del(&ce->list); kfree(ce); } @@ -625,7 +625,7 @@ index 4b49d0e..4f69037 100644 st->p.ppp_opackets = ppp->stats.tx_packets; st->p.ppp_oerrors = ppp->stats.tx_errors; st->p.ppp_obytes = ppp->stats.tx_bytes; -- if (vj = 0) +- if (vj == 0) + if (!vj) return; st->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed; @@ -634,7 +634,7 @@ index 4b49d0e..4f69037 100644 mutex_lock(&all_ppp_mutex); ppp = ppp_find_unit(unit); -- if (ppp = 0) +- if (ppp == 0) + if (!ppp) goto out; write_lock_bh(&pch->upl); @@ -661,7 +661,7 @@ index 00e2fb4..f0c6a19 100644 ap = kzalloc(sizeof(*ap), GFP_KERNEL); err = -ENOMEM; -- if (ap = 0) +- if (ap == 0) + if (!ap) goto out; @@ -670,7 +670,7 @@ index 00e2fb4..f0c6a19 100644 ap = tty->disc_data; tty->disc_data = NULL; write_unlock_irq(&disc_data_lock); -- if (ap = 0) +- if (ap == 0) + if (!ap) return; @@ -688,14 +688,14 @@ index 00e2fb4..f0c6a19 100644 int __user *p = (int __user *)arg; int err, val; -- if (ap = 0) +- if (ap == 0) + if (!ap) return -ENXIO; err = -EFAULT; switch (cmd) { case PPPIOCGCHAN: err = -ENXIO; -- if (ap = 0) +- if (ap == 0) + if (!ap) break; err = -EFAULT; @@ -704,7 +704,7 @@ index 00e2fb4..f0c6a19 100644 case PPPIOCGUNIT: err = -ENXIO; -- if (ap = 0) +- if (ap == 0) + if (!ap) break; err = -EFAULT; @@ -713,7 +713,7 @@ index 00e2fb4..f0c6a19 100644 struct syncppp *ap = sp_get(tty); unsigned long flags; -- if (ap = 0) +- if (ap == 0) + if (!ap) return; spin_lock_irqsave(&ap->recv_lock, flags); @@ -722,7 +722,7 @@ index 00e2fb4..f0c6a19 100644 struct syncppp *ap = sp_get(tty); clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); -- if (ap = 0) +- if (ap == 0) + if (!ap) return; set_bit(XMIT_WAKEUP, &ap->xmit_flags); @@ -758,7 +758,7 @@ index 00e2fb4..f0c6a19 100644 ppp_print_buffer ("receive buffer", buf, count); /* stuff the chars in the skb */ -- if ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) = 0) { +- if ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) == 0) { + skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2); + if (!skb) { printk(KERN_ERR "PPPsync: no memory (input pkt)\n"); diff --git a/a/content_digest b/N1/content_digest index 0e82c06..a2c937b 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Joe Perches <joe@perches.com>\0" "Subject\0[PATCH] - drivers/net/ppp_* - remove ptr comparisons to 0\0" - "Date\0Mon, 12 Nov 2007 23:33:51 +0000\0" + "Date\0Mon, 12 Nov 2007 15:33:51 -0800\0" "To\0Paul Mackerras <paulus@samba.org>" " linux-ppp@vger.kernel.org\0" "Cc\0netdev <netdev@vger.kernel.org>" @@ -27,7 +27,7 @@ " \n" " \terr = -ENOMEM;\n" " \tap = kzalloc(sizeof(*ap), GFP_KERNEL);\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\tgoto out;\n" " \n" @@ -36,7 +36,7 @@ " \tap = tty->disc_data;\n" " \ttty->disc_data = NULL;\n" " \twrite_unlock_irq(&disc_data_lock);\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \n" @@ -58,14 +58,14 @@ " \tint err, val;\n" " \tint __user *p = (int __user *)arg;\n" " \n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn -ENXIO;\n" " \terr = -EFAULT;\n" " \tswitch (cmd) {\n" " \tcase PPPIOCGCHAN:\n" " \t\terr = -ENXIO;\n" - "-\t\tif (ap = 0)\n" + "-\t\tif (ap == 0)\n" "+\t\tif (!ap)\n" " \t\t\tbreak;\n" " \t\terr = -EFAULT;\n" @@ -74,7 +74,7 @@ " \n" " \tcase PPPIOCGUNIT:\n" " \t\terr = -ENXIO;\n" - "-\t\tif (ap = 0)\n" + "-\t\tif (ap == 0)\n" "+\t\tif (!ap)\n" " \t\t\tbreak;\n" " \t\terr = -EFAULT;\n" @@ -83,7 +83,7 @@ " \tstruct asyncppp *ap = ap_get(tty);\n" " \tunsigned long flags;\n" " \n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \tspin_lock_irqsave(&ap->recv_lock, flags);\n" @@ -92,7 +92,7 @@ " \tstruct asyncppp *ap = ap_get(tty);\n" " \n" " \tclear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \tset_bit(XMIT_WAKEUP, &ap->xmit_flags);\n" @@ -137,19 +137,19 @@ " \t\t\tn = scan_ordinary(ap, buf, count);\n" " \n" " \t\tf = 0;\n" - "-\t\tif (flags != 0 && (ap->state & SC_TOSS) = 0) {\n" - "+\t\tif (flags && (ap->state & SC_TOSS) = 0) {\n" + "-\t\tif (flags != 0 && (ap->state & SC_TOSS) == 0) {\n" + "+\t\tif (flags && (ap->state & SC_TOSS) == 0) {\n" " \t\t\t/* check the flags to see if any char had an error */\n" " \t\t\tfor (j = 0; j < n; ++j)\n" " \t\t\t\tif ((f = flags[j]) != 0)\n" "@@ -878,9 +878,9 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,\n" - " \t\t} else if (n > 0 && (ap->state & SC_TOSS) = 0) {\n" + " \t\t} else if (n > 0 && (ap->state & SC_TOSS) == 0) {\n" " \t\t\t/* stuff the chars in the skb */\n" " \t\t\tskb = ap->rpkt;\n" - "-\t\t\tif (skb = 0) {\n" + "-\t\t\tif (skb == 0) {\n" "+\t\t\tif (!skb) {\n" " \t\t\t\tskb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2);\n" - "-\t\t\t\tif (skb = 0)\n" + "-\t\t\t\tif (skb == 0)\n" "+\t\t\t\tif (!skb)\n" " \t\t\t\t\tgoto nomem;\n" " \t\t\t\tap->rpkt = skb;\n" @@ -174,13 +174,13 @@ "-\tif (pf != 0) {\n" "+\tif (pf) {\n" " \t\tfile->private_data = NULL;\n" - " \t\tif (pf->kind = INTERFACE) {\n" + " \t\tif (pf->kind == INTERFACE) {\n" " \t\t\tppp = PF_TO_PPP(pf);\n" "@@ -398,7 +398,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf,\n" " \n" " \tret = count;\n" " \n" - "-\tif (pf = 0)\n" + "-\tif (pf == 0)\n" "+\tif (!pf)\n" " \t\treturn -ENXIO;\n" " \tadd_wait_queue(&pf->rwait, &wait);\n" @@ -189,7 +189,7 @@ " \tset_current_state(TASK_RUNNING);\n" " \tremove_wait_queue(&pf->rwait, &wait);\n" " \n" - "-\tif (skb = 0)\n" + "-\tif (skb == 0)\n" "+\tif (!skb)\n" " \t\tgoto out;\n" " \n" @@ -198,12 +198,12 @@ " \tstruct sk_buff *skb;\n" " \tssize_t ret;\n" " \n" - "-\tif (pf = 0)\n" + "-\tif (pf == 0)\n" "+\tif (!pf)\n" " \t\treturn -ENXIO;\n" " \tret = -ENOMEM;\n" " \tskb = alloc_skb(count + pf->hdrlen, GFP_KERNEL);\n" - "-\tif (skb = 0)\n" + "-\tif (skb == 0)\n" "+\tif (!skb)\n" " \t\tgoto out;\n" " \tskb_reserve(skb, pf->hdrlen);\n" @@ -212,7 +212,7 @@ " \tstruct ppp_file *pf = file->private_data;\n" " \tunsigned int mask;\n" " \n" - "-\tif (pf = 0)\n" + "-\tif (pf == 0)\n" "+\tif (!pf)\n" " \t\treturn 0;\n" " \tpoll_wait(file, &pf->rwait, wait);\n" @@ -226,16 +226,16 @@ " \tvoid __user *argp = (void __user *)arg;\n" " \tint __user *p = argp;\n" " \n" - "-\tif (pf = 0)\n" + "-\tif (pf == 0)\n" "+\tif (!pf)\n" " \t\treturn ppp_unattached_ioctl(pf, file, cmd, arg);\n" " \n" - " \tif (cmd = PPPIOCDETACH) {\n" + " \tif (cmd == PPPIOCDETACH) {\n" "@@ -689,13 +689,13 @@ static int ppp_ioctl(struct inode *inode, struct file *file,\n" " \t\t\tval &= 0xffff;\n" " \t\t}\n" " \t\tvj = slhc_init(val2+1, val+1);\n" - "-\t\tif (vj = 0) {\n" + "-\t\tif (vj == 0) {\n" "+\t\tif (!vj) {\n" " \t\t\tprintk(KERN_ERR \"PPP: no memory (VJ compressor)\\n\");\n" " \t\t\terr = -ENOMEM;\n" @@ -251,7 +251,7 @@ " \t\tif (get_user(unit, p))\n" " \t\t\tbreak;\n" " \t\tppp = ppp_create_interface(unit, &err);\n" - "-\t\tif (ppp = 0)\n" + "-\t\tif (ppp == 0)\n" "+\t\tif (!ppp)\n" " \t\t\tbreak;\n" " \t\tfile->private_data = &ppp->file;\n" @@ -293,14 +293,14 @@ "-\tif (ppp->dev != 0) {\n" "+\tif (ppp->dev) {\n" " \t\tppp_push(ppp);\n" - "-\t\twhile (ppp->xmit_pending = 0\n" + "-\t\twhile (ppp->xmit_pending == 0\n" "-\t\t && (skb = skb_dequeue(&ppp->file.xq)) != 0)\n" "+\t\twhile (!ppp->xmit_pending\n" "+\t\t && (skb = skb_dequeue(&ppp->file.xq)))\n" " \t\t\tppp_send_frame(ppp, skb);\n" " \t\t/* If there's no work left to do, tell the core net\n" " \t\t code that we can accept some more. */\n" - "-\t\tif (ppp->xmit_pending = 0 && skb_peek(&ppp->file.xq) = 0)\n" + "-\t\tif (ppp->xmit_pending == 0 && skb_peek(&ppp->file.xq) == 0)\n" "+\t\tif (!ppp->xmit_pending && !skb_peek(&ppp->file.xq))\n" " \t\t\tnetif_wake_queue(ppp->dev);\n" " \t}\n" @@ -309,13 +309,13 @@ " \n" " \tswitch (proto) {\n" " \tcase PPP_IP:\n" - "-\t\tif (ppp->vj = 0 || (ppp->flags & SC_COMP_TCP) = 0)\n" - "+\t\tif (!ppp->vj || (ppp->flags & SC_COMP_TCP) = 0)\n" + "-\t\tif (ppp->vj == 0 || (ppp->flags & SC_COMP_TCP) == 0)\n" + "+\t\tif (!ppp->vj || (ppp->flags & SC_COMP_TCP) == 0)\n" " \t\t\tbreak;\n" " \t\t/* try to do VJ TCP header compression */\n" " \t\tnew_skb = alloc_skb(skb->len + ppp->dev->hard_header_len - 2,\n" " \t\t\t\t GFP_ATOMIC);\n" - "-\t\tif (new_skb = 0) {\n" + "-\t\tif (new_skb == 0) {\n" "+\t\tif (!new_skb) {\n" " \t\t\tprintk(KERN_ERR \"PPP: no memory (VJ comp pkt)\\n\");\n" " \t\t\tgoto drop;\n" @@ -333,16 +333,16 @@ " \tstruct channel *pch;\n" " \tstruct sk_buff *skb = ppp->xmit_pending;\n" " \n" - "-\tif (skb = 0)\n" + "-\tif (skb == 0)\n" "+\tif (!skb)\n" " \t\treturn;\n" " \n" " \tlist = &ppp->channels;\n" "@@ -1355,7 +1355,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)\n" - " \t\tif (flen = len && nfree = 0)\n" + " \t\tif (flen == len && nfree == 0)\n" " \t\t\tbits |= E;\n" - " \t\tfrag = alloc_skb(flen + hdrlen + (flen = 0), GFP_ATOMIC);\n" - "-\t\tif (frag = 0)\n" + " \t\tfrag = alloc_skb(flen + hdrlen + (flen == 0), GFP_ATOMIC);\n" + "-\t\tif (frag == 0)\n" "+\t\tif (!frag)\n" " \t\t\tgoto noskb;\n" " \t\tq = skb_put(frag, flen + hdrlen);\n" @@ -368,7 +368,7 @@ "@@ -1462,7 +1462,7 @@ ppp_do_recv(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)\n" " {\n" " \tppp_recv_lock(ppp);\n" - " \t/* ppp->dev = 0 means interface is closing down */\n" + " \t/* ppp->dev == 0 means interface is closing down */\n" "-\tif (ppp->dev != 0)\n" "+\tif (ppp->dev)\n" " \t\tppp_receive_frame(ppp, skb, pch);\n" @@ -378,16 +378,16 @@ " \tstruct channel *pch = chan->ppp;\n" " \tint proto;\n" " \n" - "-\tif (pch = 0 || skb->len = 0) {\n" - "+\tif (!pch || skb->len = 0) {\n" + "-\tif (pch == 0 || skb->len == 0) {\n" + "+\tif (!pch || skb->len == 0) {\n" " \t\tkfree_skb(skb);\n" " \t\treturn;\n" " \t}\n" " \n" " \tproto = PPP_PROTO(skb);\n" " \tread_lock_bh(&pch->upl);\n" - "-\tif (pch->ppp = 0 || proto >= 0xc000 || proto = PPP_CCPFRAG) {\n" - "+\tif (!pch->ppp || proto >= 0xc000 || proto = PPP_CCPFRAG) {\n" + "-\tif (pch->ppp == 0 || proto >= 0xc000 || proto == PPP_CCPFRAG) {\n" + "+\tif (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) {\n" " \t\t/* put it on the channel queue */\n" " \t\tskb_queue_tail(&pch->file.rq, skb);\n" " \t\t/* drop old frames if queue too long */\n" @@ -401,7 +401,7 @@ " \tstruct channel *pch = chan->ppp;\n" " \tstruct sk_buff *skb;\n" " \n" - "-\tif (pch = 0)\n" + "-\tif (pch == 0)\n" "+\tif (!pch)\n" " \t\treturn;\n" " \n" @@ -429,21 +429,21 @@ " \t */\n" "-\tif (ppp->rc_state != 0 && (ppp->rstate & SC_DECOMP_RUN)\n" "+\tif (ppp->rc_state && (ppp->rstate & SC_DECOMP_RUN)\n" - " \t && (ppp->rstate & (SC_DC_FERROR | SC_DC_ERROR)) = 0)\n" + " \t && (ppp->rstate & (SC_DC_FERROR | SC_DC_ERROR)) == 0)\n" " \t\tskb = ppp_decompress_frame(ppp, skb);\n" " \n" "@@ -1574,13 +1574,13 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n" " \tswitch (proto) {\n" " \tcase PPP_VJC_COMP:\n" " \t\t/* decompress VJ compressed packets */\n" - "-\t\tif (ppp->vj = 0 || (ppp->flags & SC_REJ_COMP_TCP))\n" + "-\t\tif (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP))\n" "+\t\tif (!ppp->vj || (ppp->flags & SC_REJ_COMP_TCP))\n" " \t\t\tgoto err;\n" " \n" " \t\tif (skb_tailroom(skb) < 124 || skb_cloned(skb)) {\n" " \t\t\t/* copy to a new sk_buff with more tailroom */\n" " \t\t\tns = dev_alloc_skb(skb->len + 128);\n" - "-\t\t\tif (ns = 0) {\n" + "-\t\t\tif (ns == 0) {\n" "+\t\t\tif (!ns) {\n" " \t\t\t\tprintk(KERN_ERR\"PPP: no memory (VJ decomp)\\n\");\n" " \t\t\t\tgoto err;\n" @@ -452,7 +452,7 @@ " \t\tbreak;\n" " \n" " \tcase PPP_VJC_UNCOMP:\n" - "-\t\tif (ppp->vj = 0 || (ppp->flags & SC_REJ_COMP_TCP))\n" + "-\t\tif (ppp->vj == 0 || (ppp->flags & SC_REJ_COMP_TCP))\n" "+\t\tif (!ppp->vj || (ppp->flags & SC_REJ_COMP_TCP))\n" " \t\t\tgoto err;\n" " \n" @@ -470,7 +470,7 @@ " \t\t}\n" " \n" " \t\tns = dev_alloc_skb(obuff_size);\n" - "-\t\tif (ns = 0) {\n" + "-\t\tif (ns == 0) {\n" "+\t\tif (!ns) {\n" " \t\t\tprintk(KERN_ERR \"ppp_decompress_frame: no memory\\n\");\n" " \t\t\tgoto err;\n" @@ -488,7 +488,7 @@ " \tstruct channel *pch;\n" " \n" " \tpch = kzalloc(sizeof(struct channel), GFP_KERNEL);\n" - "-\tif (pch = 0)\n" + "-\tif (pch == 0)\n" "+\tif (!pch)\n" " \t\treturn -ENOMEM;\n" " \tpch->ppp = NULL;\n" @@ -518,7 +518,7 @@ " {\n" " \tstruct channel *pch = chan->ppp;\n" " \n" - "-\tif (pch = 0)\n" + "-\tif (pch == 0)\n" "+\tif (!pch)\n" " \t\treturn;\t\t/* should never happen */\n" " \tchan->ppp = NULL;\n" @@ -527,7 +527,7 @@ " {\n" " \tstruct channel *pch = chan->ppp;\n" " \n" - "-\tif (pch = 0)\n" + "-\tif (pch == 0)\n" "+\tif (!pch)\n" " \t\treturn;\n" " \tppp_channel_push(pch);\n" @@ -536,13 +536,13 @@ " \n" " \tcp = find_compressor(ccp_option[0]);\n" " #ifdef CONFIG_KMOD\n" - "-\tif (cp = 0) {\n" + "-\tif (cp == 0) {\n" "+\tif (!cp) {\n" " \t\trequest_module(\"ppp-compress-%d\", ccp_option[0]);\n" " \t\tcp = find_compressor(ccp_option[0]);\n" " \t}\n" " #endif /* CONFIG_KMOD */\n" - "-\tif (cp = 0)\n" + "-\tif (cp == 0)\n" "+\tif (!cp)\n" " \t\tgoto out;\n" " \n" @@ -585,7 +585,7 @@ " \t\t\tbreak;\n" " \t\tif (inbound) {\n" " \t\t\t/* we will start receiving compressed packets */\n" - "-\t\t\tif (ppp->rc_state = 0)\n" + "-\t\t\tif (ppp->rc_state == 0)\n" "+\t\t\tif (!ppp->rc_state)\n" " \t\t\t\tbreak;\n" " \t\t\tif (ppp->rcomp->decomp_init(ppp->rc_state, dp, len,\n" @@ -594,7 +594,7 @@ " \t\t\t}\n" " \t\t} else {\n" " \t\t\t/* we will soon start sending compressed packets */\n" - "-\t\t\tif (ppp->xc_state = 0)\n" + "-\t\t\tif (ppp->xc_state == 0)\n" "+\t\t\tif (!ppp->xc_state)\n" " \t\t\t\tbreak;\n" " \t\t\tif (ppp->xcomp->comp_init(ppp->xc_state, dp, len,\n" @@ -608,7 +608,7 @@ " \t\tgoto out;\n" " \tret = -ENOMEM;\n" " \tce = kmalloc(sizeof(struct compressor_entry), GFP_ATOMIC);\n" - "-\tif (ce = 0)\n" + "-\tif (ce == 0)\n" "+\tif (!ce)\n" " \t\tgoto out;\n" " \tret = 0;\n" @@ -617,8 +617,8 @@ " \n" " \tspin_lock(&compressor_list_lock);\n" " \tce = find_comp_entry(cp->compress_proto);\n" - "-\tif (ce != 0 && ce->comp = cp) {\n" - "+\tif (ce && ce->comp = cp) {\n" + "-\tif (ce != 0 && ce->comp == cp) {\n" + "+\tif (ce && ce->comp == cp) {\n" " \t\tlist_del(&ce->list);\n" " \t\tkfree(ce);\n" " \t}\n" @@ -635,7 +635,7 @@ " \tst->p.ppp_opackets = ppp->stats.tx_packets;\n" " \tst->p.ppp_oerrors = ppp->stats.tx_errors;\n" " \tst->p.ppp_obytes = ppp->stats.tx_bytes;\n" - "-\tif (vj = 0)\n" + "-\tif (vj == 0)\n" "+\tif (!vj)\n" " \t\treturn;\n" " \tst->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed;\n" @@ -644,7 +644,7 @@ " \n" " \tmutex_lock(&all_ppp_mutex);\n" " \tppp = ppp_find_unit(unit);\n" - "-\tif (ppp = 0)\n" + "-\tif (ppp == 0)\n" "+\tif (!ppp)\n" " \t\tgoto out;\n" " \twrite_lock_bh(&pch->upl);\n" @@ -671,7 +671,7 @@ " \n" " \tap = kzalloc(sizeof(*ap), GFP_KERNEL);\n" " \terr = -ENOMEM;\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\tgoto out;\n" " \n" @@ -680,7 +680,7 @@ " \tap = tty->disc_data;\n" " \ttty->disc_data = NULL;\n" " \twrite_unlock_irq(&disc_data_lock);\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \n" @@ -698,14 +698,14 @@ " \tint __user *p = (int __user *)arg;\n" " \tint err, val;\n" " \n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn -ENXIO;\n" " \terr = -EFAULT;\n" " \tswitch (cmd) {\n" " \tcase PPPIOCGCHAN:\n" " \t\terr = -ENXIO;\n" - "-\t\tif (ap = 0)\n" + "-\t\tif (ap == 0)\n" "+\t\tif (!ap)\n" " \t\t\tbreak;\n" " \t\terr = -EFAULT;\n" @@ -714,7 +714,7 @@ " \n" " \tcase PPPIOCGUNIT:\n" " \t\terr = -ENXIO;\n" - "-\t\tif (ap = 0)\n" + "-\t\tif (ap == 0)\n" "+\t\tif (!ap)\n" " \t\t\tbreak;\n" " \t\terr = -EFAULT;\n" @@ -723,7 +723,7 @@ " \tstruct syncppp *ap = sp_get(tty);\n" " \tunsigned long flags;\n" " \n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \tspin_lock_irqsave(&ap->recv_lock, flags);\n" @@ -732,7 +732,7 @@ " \tstruct syncppp *ap = sp_get(tty);\n" " \n" " \tclear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);\n" - "-\tif (ap = 0)\n" + "-\tif (ap == 0)\n" "+\tif (!ap)\n" " \t\treturn;\n" " \tset_bit(XMIT_WAKEUP, &ap->xmit_flags);\n" @@ -768,7 +768,7 @@ " \t\tppp_print_buffer (\"receive buffer\", buf, count);\n" " \n" " \t/* stuff the chars in the skb */\n" - "-\tif ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) = 0) {\n" + "-\tif ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) == 0) {\n" "+\tskb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2);\n" "+\tif (!skb) {\n" " \t\tprintk(KERN_ERR \"PPPsync: no memory (input pkt)\\n\");\n" @@ -784,4 +784,4 @@ " \t\tgoto err;\n" " \t} else if (count > skb_tailroom(skb)) {" -fe09bd4f525fcc2009a29252994ae53e9abd5fe254a3549a30a75c77edcbc3a2 +7ce08c9bfad61bbe48e838e59ef1afdbd15b8265e6484f14e290fbc24d17de9a
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.