aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2017-01-25 10:42:12 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2017-01-25 10:42:12 -0800
commit84580cc487526239d890abf1bbedccc17ae5629b (patch)
treee79de97fdb35f7d0bbc248f9f0081c4e8cf589ab /src
parent80cc39009fec5242249eb8765be20c02f8d666b5 (diff)
PR comments: do-while in lieu of goto
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index 1a61e10685..695b19d69c 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -76,10 +76,10 @@ static void update_list(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
static bool stream_ref_if_not_destroyed(gpr_refcount *r) {
gpr_atm count;
-retry:
- count = gpr_atm_acq_load(&r->count);
- if (count == 0) return false;
- if (!gpr_atm_rel_cas(&r->count, count, count + 1)) goto retry;
+ do {
+ count = gpr_atm_acq_load(&r->count);
+ if (count == 0) return false;
+ } while (!gpr_atm_rel_cas(&r->count, count, count + 1));
return true;
}