Commit 482d1748 by Patrick Steinhardt

transports: smart: do not redeclare loop counters

parent 6cf575b1
...@@ -412,12 +412,12 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c ...@@ -412,12 +412,12 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
if (i % 20 == 0 && t->rpc) { if (i % 20 == 0 && t->rpc) {
git_pkt_ack *pkt; git_pkt_ack *pkt;
unsigned int i; unsigned int j;
if ((error = git_pkt_buffer_wants(wants, count, &t->caps, &data)) < 0) if ((error = git_pkt_buffer_wants(wants, count, &t->caps, &data)) < 0)
goto on_error; goto on_error;
git_vector_foreach(&t->common, i, pkt) { git_vector_foreach(&t->common, j, pkt) {
if ((error = git_pkt_buffer_have(&pkt->oid, &data)) < 0) if ((error = git_pkt_buffer_have(&pkt->oid, &data)) < 0)
goto on_error; goto on_error;
} }
...@@ -432,12 +432,12 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c ...@@ -432,12 +432,12 @@ int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, c
/* Tell the other end that we're done negotiating */ /* Tell the other end that we're done negotiating */
if (t->rpc && t->common.length > 0) { if (t->rpc && t->common.length > 0) {
git_pkt_ack *pkt; git_pkt_ack *pkt;
unsigned int i; unsigned int j;
if ((error = git_pkt_buffer_wants(wants, count, &t->caps, &data)) < 0) if ((error = git_pkt_buffer_wants(wants, count, &t->caps, &data)) < 0)
goto on_error; goto on_error;
git_vector_foreach(&t->common, i, pkt) { git_vector_foreach(&t->common, j, pkt) {
if ((error = git_pkt_buffer_have(&pkt->oid, &data)) < 0) if ((error = git_pkt_buffer_have(&pkt->oid, &data)) < 0)
goto on_error; goto on_error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment