aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/core/end2end/cq_verifier.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index c98fb6b61b..69eb5a810b 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -71,8 +71,8 @@ struct cq_verifier {
/* bound completion queue */
grpc_completion_queue *cq;
/* expectation list */
- expectation* first_expectation;
- expectation* last_expectation;
+ expectation *first_expectation;
+ expectation *last_expectation;
};
cq_verifier *cq_verifier_create(grpc_completion_queue *cq) {
@@ -231,18 +231,15 @@ void cq_verify(cq_verifier *v) {
break;
}
- expectation* prev = NULL;
+ expectation *prev = NULL;
for (e = v->first_expectation; e != NULL; e = e->next) {
gpr_asprintf(&s, " %p", e->tag);
gpr_strvec_add(&have_tags, s);
if (e->tag == ev.tag) {
verify_matches(e, &ev);
- if (e == v->first_expectation)
- v->first_expectation = e->next;
- if (prev != NULL)
- prev->next = e->next;
- if (e == v->last_expectation)
- v->last_expectation = prev;
+ if (e == v->first_expectation) v->first_expectation = e->next;
+ if (prev != NULL) prev->next = e->next;
+ if (e == v->last_expectation) v->last_expectation = prev;
gpr_free(e);
break;
}
@@ -289,10 +286,8 @@ static void add(cq_verifier *v, grpc_completion_type type, void *tag,
e->tag = tag;
e->success = success;
e->next = NULL;
- if (v->first_expectation == NULL)
- v->first_expectation = e;
- if (v->last_expectation != NULL)
- v->last_expectation->next = e;
+ if (v->first_expectation == NULL) v->first_expectation = e;
+ if (v->last_expectation != NULL) v->last_expectation->next = e;
v->last_expectation = e;
}