cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] continue statement of death?
Date: Thu, 12 Sep 2019 16:51:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1909121651010.2876@hadrien> (raw)
In-Reply-To: <30bb4d7a-5adc-8294-e343-04a3b534f56c@web.de>



On Thu, 12 Sep 2019, Markus Elfring wrote:

> >  - 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

This does indeed seem to avoid the problem.  Nevertheless, it is useful to
have the problem reported in the first place.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      parent reply	other threads:[~2019-09-12 14:51 UTC|newest]

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

Reply instructions:

You may reply publicly 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=alpine.DEB.2.21.1909121651010.2876@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).