Commit 059379a0 authored by Vitezslav Kriz's avatar Vitezslav Kriz Committed by Petr Špaček

code-style: remove special operator (-->) in for loops

parent ddb2e76a
......@@ -678,8 +678,8 @@ static void subreq_finalize(struct qr_task *task, const struct sockaddr *packet_
}
/* Notify waiting tasks. */
struct kr_query *leader_qry = array_tail(task->req.rplan.pending);
for (size_t i = task->waiting.len; i --> 0;) {
struct qr_task *follower = task->waiting.at[i];
for (size_t i = task->waiting.len; i > 0; i--) {
struct qr_task *follower = task->waiting.at[i - 1];
/* Reuse MSGID and 0x20 secret */
if (follower->req.rplan.pending.len > 0) {
struct kr_query *qry = array_tail(follower->req.rplan.pending);
......
......@@ -228,9 +228,9 @@ int kr_rplan_pop(struct kr_rplan *rplan, struct kr_query *qry)
}
/* Find the query, it will likely be on top */
for (size_t i = rplan->pending.len; i --> 0;) {
if (rplan->pending.at[i] == qry) {
array_del(rplan->pending, i);
for (size_t i = rplan->pending.len; i > 0; i--) {
if (rplan->pending.at[i - 1] == qry) {
array_del(rplan->pending, i - 1);
array_push(rplan->resolved, qry);
break;
}
......
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