use SWAP macro
Apply the semantic patch swap.cocci to convert hand-rolled swaps to use the macro SWAP. The resulting code is shorter and easier to read, the object code is effectively unchanged. The patch for object.c had to be hand-edited in order to preserve the comment before the change; Coccinelle tried to eat it for some reason. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
db10199141
commit
35d803bc9a
@ -1390,14 +1390,11 @@ static int process_renames(struct merge_options *o,
|
||||
branch1 = o->branch1;
|
||||
branch2 = o->branch2;
|
||||
} else {
|
||||
struct rename *tmp;
|
||||
renames1 = b_renames;
|
||||
renames2Dst = &a_by_dst;
|
||||
branch1 = o->branch2;
|
||||
branch2 = o->branch1;
|
||||
tmp = ren2;
|
||||
ren2 = ren1;
|
||||
ren1 = tmp;
|
||||
SWAP(ren2, ren1);
|
||||
}
|
||||
|
||||
if (ren1->processed)
|
||||
|
||||
Reference in New Issue
Block a user