clang-format

pull/7616/head
Mark D. Roth 8 years ago
parent cf501a717a
commit 5f3cb4d83a
  1. 21
      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;
}

Loading…
Cancel
Save