Skip to content

Commit 76d1567

Browse files
rscharfegitster
authored andcommitted
contrib/coccinelle: fix semantic patch for oid_to_hex_r()
Both sha1_to_hex_r() and oid_to_hex_r() take two parameters, so use two expressions in the semantic patch for transforming calls of the former to the latter one. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9194226 commit 76d1567

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/coccinelle/object_id.cocci

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ expression E1;
2323
+ oid_to_hex(E1)
2424

2525
@@
26-
expression E1;
26+
expression E1, E2;
2727
@@
28-
- sha1_to_hex_r(E1.hash)
29-
+ oid_to_hex_r(&E1)
28+
- sha1_to_hex_r(E1, E2.hash)
29+
+ oid_to_hex_r(E1, &E2)
3030

3131
@@
32-
expression E1;
32+
expression E1, E2;
3333
@@
34-
- sha1_to_hex_r(E1->hash)
35-
+ oid_to_hex_r(E1)
34+
- sha1_to_hex_r(E1, E2->hash)
35+
+ oid_to_hex_r(E1, E2)
3636

3737
@@
3838
expression E1;

0 commit comments

Comments
 (0)