Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 09:43:48 +0300
committerJunio C Hamano <gitster@pobox.com>2018-10-30 09:43:48 +0300
commitda3e0752cdfe7ae535b4e740f162f1e4926d4201 (patch)
tree6c2f666dc5962b86db4ffe24532f06870b57ba4f /fsck.c
parent67224b7b5a51223e933467204d077c658b367b42 (diff)
parentb84c7838829f997e0a0028b678b7ae8f7a21cc62 (diff)
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 'fsck.c')
-rw-r--r--fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsck.c b/fsck.c
index 38624d2511..68502ce85b 100644
--- a/fsck.c
+++ b/fsck.c
@@ -479,7 +479,7 @@ static int fsck_walk_commit(struct commit *commit, void *data, struct fsck_optio
if (name) {
struct object *obj = &parents->item->object;
- if (++counter > 1)
+ if (counter++)
put_object_name(options, obj, "%s^%d",
name, counter);
else if (generation > 0)