Skip to content
Snippets Groups Projects
Commit 196afc43 authored by Junio C Hamano's avatar Junio C Hamano
Browse files

Merge branch 'jc/cocci-preincr' into maint

Code cleanup.

* jc/cocci-preincr:
  fsck: s/++i > 1/i++/
  cocci: simplify "if (++u > 1)" to "if (u++)"
parents eba14167 b84c7838
No related branches found
No related tags found
No related merge requests found
@ preincrement @
identifier i;
@@
- ++i > 1
+ i++
Loading
Loading
@@ -485,7 +485,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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment