From: wagi@monom.org (Daniel Wagner)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Formatting issues
Date: Wed, 17 Jul 2013 16:56:14 +0200 [thread overview]
Message-ID: <51E6B08E.9030600@monom.org> (raw)
Hi,
I have found another small issue. Not a big thing. I have following rule
@@
identifier f =~ "^(__)?connman_.*" ;
@@
f(...,
(
- FALSE
+ false
|
- TRUE
+ true
)
,...)
And this little C example:
bool __connman_bar(bool baz);
int connman_foo(int val, bool bar);
int main(int argc, char *argv)
{
int err;
if (__connman_bar(FALSE) == TRUE)
err = connman_a_rather_long_line(2434, TRUE);
return 0;
}
Running coccinelle on this results in the not so nicely formated patch:
@@ -5,8 +5,9 @@ int main(int argc, char *argv)
{
int err;
- if (__connman_bar(FALSE) == TRUE)
- err = connman_a_rather_long_line(2434, TRUE);
+ if (__connman_bar(false) == TRUE)
+ err = connman_a_rather_long_line(2434,
+ true);
return 0;
}
When connman_a_rather_long_line() is not sooo long then it works as
expected, that means not additional line is introduced. Any ideas
what is going wrong?
cheers,
daniel
next reply other threads:[~2013-07-17 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 14:56 Daniel Wagner [this message]
2013-07-17 15:07 ` [Cocci] Formatting issues Julia Lawall
2013-07-17 15:16 ` Daniel Wagner
2013-07-17 15:31 ` Julia Lawall
2013-07-17 15:41 ` Daniel Wagner
2013-07-17 15:51 ` Ondřej Bílka
2013-07-29 8:42 ` Daniel Wagner
2013-07-29 8:49 ` Julia Lawall
2013-07-29 9:07 ` Daniel Wagner
2013-07-29 9:14 ` Julia Lawall
2013-07-29 14:58 ` [Cocci] Formatting issue Daniel Wagner
2013-07-29 9:28 ` [Cocci] Formatting issues Ondřej Bílka
2013-07-29 14:59 ` Daniel Wagner
2013-07-29 15:59 ` Ondřej Bílka
2013-07-30 21:06 ` Daniel Wagner
2013-07-28 10:48 ` Julia Lawall
2013-07-29 8:33 ` Daniel Wagner
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=51E6B08E.9030600@monom.org \
--to=wagi@monom.org \
--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