All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mansour Moufid <mansourmoufid@gmail.com>
To: "Andrew 👽 Yourtchenko" <ayourtch@gmail.com>
Cc: cocci@systeme.lip6.fr
Subject: Re: [Cocci] how to make substitutions at the end of the function, vs. the end of the block ?
Date: Sat, 31 Jul 2021 15:20:16 -0400	[thread overview]
Message-ID: <CALogXGW+gRjJCo8UiUBNjxnnPEVynZvynhRAxYCr+EpAGzD_Cg@mail.gmail.com> (raw)
In-Reply-To: <CAPi140P-O0B+BiAa7i+WbdfmG3HnA3yCZdy4+SeKa=2jRreTyg@mail.gmail.com>

On Fri, Jul 30, 2021 at 7:00 AM Andrew 👽 Yourtchenko
<ayourtch@gmail.com> wrote:
>
> However, when I run it, the "done: " label, etc. gets inserted twice:

Every return statement is the end of a function. ;)

I don't know of a way to match only the "last" return statement in a
function, maybe with scripting...
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      reply	other threads:[~2021-07-31 19:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  9:31 [Cocci] how to make substitutions at the end of the function, vs. the end of the block ? Andrew 👽  Yourtchenko
2021-07-31 19:20 ` Mansour Moufid [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=CALogXGW+gRjJCo8UiUBNjxnnPEVynZvynhRAxYCr+EpAGzD_Cg@mail.gmail.com \
    --to=mansourmoufid@gmail.com \
    --cc=ayourtch@gmail.com \
    --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 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.