Skip to content

Commit f569065

Browse files
dschogitster
authored andcommitted
remote-curl: avoid using the comma operator unnecessarily
The comma operator is a somewhat obscure C feature that is often used by mistake and can even cause unintentional code flow. Better use a semicolon instead. Signed-off-by: Johannes Schindelin <[email protected]> Acked-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 683c54c commit f569065

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

remote-curl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ static int fetch_git(struct discovery *heads,
12391239
packet_buf_flush(&preamble);
12401240

12411241
memset(&rpc, 0, sizeof(rpc));
1242-
rpc.service_name = "git-upload-pack",
1242+
rpc.service_name = "git-upload-pack";
12431243
rpc.gzip_request = 1;
12441244

12451245
err = rpc_service(&rpc, heads, args.v, &preamble, &rpc_result);
@@ -1401,7 +1401,7 @@ static int push_git(struct discovery *heads, int nr_spec, const char **specs)
14011401
packet_buf_flush(&preamble);
14021402

14031403
memset(&rpc, 0, sizeof(rpc));
1404-
rpc.service_name = "git-receive-pack",
1404+
rpc.service_name = "git-receive-pack";
14051405

14061406
err = rpc_service(&rpc, heads, args.v, &preamble, &rpc_result);
14071407
if (rpc_result.len)

0 commit comments

Comments
 (0)