summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 07:43:48 +0100
committerJunio C Hamano <gitster@pobox.com>2018-10-30 07:43:48 +0100
commitda3e0752cdfe7ae535b4e740f162f1e4926d4201 (patch)
tree6c2f666dc5962b86db4ffe24532f06870b57ba4f /contrib
parentMerge branch 'ss/rename-tests' (diff)
parentfsck: s/++i > 1/i++/ (diff)
downloadgit-da3e0752cdfe7ae535b4e740f162f1e4926d4201.tar.xz
git-da3e0752cdfe7ae535b4e740f162f1e4926d4201.zip
Merge branch 'jc/cocci-preincr'
Code cleanup. * jc/cocci-preincr: fsck: s/++i > 1/i++/ cocci: simplify "if (++u > 1)" to "if (u++)"
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/preincr.cocci5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/coccinelle/preincr.cocci b/contrib/coccinelle/preincr.cocci
new file mode 100644
index 0000000000..7fe1e8d2d9
--- /dev/null
+++ b/contrib/coccinelle/preincr.cocci
@@ -0,0 +1,5 @@
+@ preincrement @
+identifier i;
+@@
+- ++i > 1
++ i++