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 <johannes.schindelin@gmx.de> Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Mar 27, 2025 at 11:52 UTC
f569065fc4ea047e1b2b0d50d2a59d9987a050b3
1 file changed
+2
-2
remote-curl.c
+2
-2
@@ -1239,7 +1239,7 @@ static int fetch_git(struct discovery *heads,
1239
packet_buf_flush(&preamble);
1240
1241
memset(&rpc, 0, sizeof(rpc));
1242
- rpc.service_name = "git-upload-pack",
1242
+ rpc.service_name = "git-upload-pack";
1243
rpc.gzip_request = 1;
1244
1245
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)
1401
packet_buf_flush(&preamble);
1402
1403
memset(&rpc, 0, sizeof(rpc));
1404
- rpc.service_name = "git-receive-pack",
1404
+ rpc.service_name = "git-receive-pack";
1405
1406
err = rpc_service(&rpc, heads, args.v, &preamble, &rpc_result);
1407
if (rpc_result.len)