Coccinelle archive on lore.kernel.org
 help / color / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@systeme.lip6.fr, David Young <dyoung@netbsd.org>
Subject: Re: [Cocci] continue statement of death?
Date: Thu, 12 Sep 2019 15:37:42 +0200
Message-ID: <30bb4d7a-5adc-8294-e343-04a3b534f56c@web.de> (raw)
In-Reply-To: <20190912015155.GE26691@pobox.com>

>  - for (I = TAILQ_FIRST(H); I != NULL; I = TAILQ_NEXT(I, N)) S
>  + TAILQ_FOREACH(I, H, N) S

Can it make sense to avoid touching the (compound) statement at the end
so that only the loop header would be replaced?

-for (I = TAILQ_FIRST(H); I != NULL; I = TAILQ_NEXT(I, N))
+TAILQ_FOREACH(I, H, N)
 S


Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  1:51 David Young
2019-09-12  8:27 ` Julia Lawall
2019-09-12 13:37 ` Markus Elfring [this message]
2019-09-12 14:49   ` David Young
2019-09-12 14:51   ` Julia Lawall

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30bb4d7a-5adc-8294-e343-04a3b534f56c@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=dyoung@netbsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr cocci@archiver.kernel.org
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox