From 91343eaa2c55f8dab6583be17c587cdefc457360 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Tue, 28 Apr 2020 10:18:58 -0400 Subject: [PATCH] ck_backoff: avoid dead store to ceiling We only need to store the update value in our in-out parameter. --- include/ck_backoff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ck_backoff.h b/include/ck_backoff.h index 82a4f21..a1f7616 100644 --- a/include/ck_backoff.h +++ b/include/ck_backoff.h @@ -50,7 +50,7 @@ ck_backoff_eb(unsigned int *c) for (i = 0; i < ceiling; i++) ck_pr_barrier(); - *c = ceiling <<= ceiling < CK_BACKOFF_CEILING; + *c = ceiling << (ceiling < CK_BACKOFF_CEILING); return; }