[PATCH] coccinelle: simplify variable declaractions in rules from the_repository.pending.cocci

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Nov 2019 21:55:18 +0100

This script contained some transformation rules for the semantic patch language
where a few metavariables were declared with the same type “expression”.
Reduce duplicate SmPL code just by listing the desired variable names
directly behind the type specification.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
 .../coccinelle/the_repository.pending.cocci   | 44 +++++--------------
 1 file changed, 12 insertions(+), 32 deletions(-)

diff --git a/contrib/coccinelle/the_repository.pending.cocci b/contrib/coccinelle/the_repository.pending.cocci
index 2ee702ecf7..697e8fc77b 100644
--- a/contrib/coccinelle/the_repository.pending.cocci
+++ b/contrib/coccinelle/the_repository.pending.cocci
@@ -3,9 +3,7 @@
 // our code base.

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - read_object_file(
 + repo_read_object_file(the_repository,
@@ -42,17 +40,14 @@ expression F;
   E)

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - parse_commit_internal(
 + repo_parse_commit_internal(the_repository,
   E, F, G)

 @@
-expression E;
-expression F;
+expression E, F;
 @@
 - parse_commit_gently(
 + repo_parse_commit_gently(the_repository,
@@ -66,78 +61,63 @@ expression E;
   E)

 @@
-expression E;
-expression F;
+expression E, F;
 @@
 - get_merge_bases(
 + repo_get_merge_bases(the_repository,
   E, F);

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - get_merge_bases_many(
 + repo_get_merge_bases_many(the_repository,
   E, F, G);

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - get_merge_bases_many_dirty(
 + repo_get_merge_bases_many_dirty(the_repository,
   E, F, G);

 @@
-expression E;
-expression F;
+expression E, F;
 @@
 - in_merge_bases(
 + repo_in_merge_bases(the_repository,
   E, F);

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - in_merge_bases_many(
 + repo_in_merge_bases_many(the_repository,
   E, F, G);

 @@
-expression E;
-expression F;
+expression E, F;
 @@
 - get_commit_buffer(
 + repo_get_commit_buffer(the_repository,
   E, F);

 @@
-expression E;
-expression F;
+expression E, F;
 @@
 - unuse_commit_buffer(
 + repo_unuse_commit_buffer(the_repository,
   E, F);

 @@
-expression E;
-expression F;
-expression G;
+expression E, F, G;
 @@
 - logmsg_reencode(
 + repo_logmsg_reencode(the_repository,
   E, F, G);

 @@
-expression E;
-expression F;
-expression G;
-expression H;
+expression E, F, G, H;
 @@
 - format_commit_message(
 + repo_format_commit_message(the_repository,
--
2.24.0





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux