diff options
-rw-r--r-- | contrib/coccinelle/preincr.cocci | 5 | ||||
-rw-r--r-- | fsck.c | 2 |
2 files changed, 6 insertions, 1 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++ @@ -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) |