summaryrefslogtreecommitdiff
path: root/libatomic/cas_n.c
diff options
context:
space:
mode:
Diffstat (limited to 'libatomic/cas_n.c')
-rw-r--r--libatomic/cas_n.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libatomic/cas_n.c b/libatomic/cas_n.c
index 801262d551c..a885afab7a5 100644
--- a/libatomic/cas_n.c
+++ b/libatomic/cas_n.c
@@ -70,7 +70,7 @@ SIZE(libat_compare_exchange) (UTYPE *mptr, UTYPE *eptr, UTYPE newval,
mask = -1;
}
- weval = *eptr << shift;
+ weval = (UWORD)*eptr << shift;
wnewval = (UWORD)newval << shift;
woldval = __atomic_load_n (wptr, __ATOMIC_RELAXED);
do