diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2025-03-27 11:52:54 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-28 17:38:08 -0700 |
| commit | f569065fc4ea047e1b2b0d50d2a59d9987a050b3 (patch) | |
| tree | 79dc4ef8a89de5f9372a8bb2bbe63f7249a8ddff /remote-curl.c | |
| parent | Git 2.49 (diff) | |
| download | git-f569065fc4ea047e1b2b0d50d2a59d9987a050b3.tar.gz git-f569065fc4ea047e1b2b0d50d2a59d9987a050b3.zip | |
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>
Diffstat (limited to 'remote-curl.c')
| -rw-r--r-- | remote-curl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c index 1273507a96..590b228f67 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -1239,7 +1239,7 @@ static int fetch_git(struct discovery *heads, packet_buf_flush(&preamble); memset(&rpc, 0, sizeof(rpc)); - rpc.service_name = "git-upload-pack", + rpc.service_name = "git-upload-pack"; rpc.gzip_request = 1; 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) packet_buf_flush(&preamble); memset(&rpc, 0, sizeof(rpc)); - rpc.service_name = "git-receive-pack", + rpc.service_name = "git-receive-pack"; err = rpc_service(&rpc, heads, args.v, &preamble, &rpc_result); if (rpc_result.len) |
