Skip to content
Snippets Groups Projects
Commit 5f3cb4d8 authored by Mark D. Roth's avatar Mark D. Roth
Browse files

clang-format

parent cf501a71
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment