From 25023e263885eb34d7f237f608cd4a94b6043c51 Mon Sep 17 00:00:00 2001 From: danglin Date: Tue, 22 May 2012 23:54:32 +0000 Subject: [PATCH] PR other/53231 * tas_n.c (libat_test_and_set): Correct return. Remove unused variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187783 138bc75d-0d04-0410-961f-82ee72b054a4 --- libatomic/ChangeLog | 5 +++++ libatomic/tas_n.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog index 4f17024..ac46c3f 100644 --- a/libatomic/ChangeLog +++ b/libatomic/ChangeLog @@ -1,3 +1,8 @@ +2012-05-22 John David Anglin + + PR other/53231 + * tas_n.c (libat_test_and_set): Correct return. Remove unused variable. + 2012-05-16 H.J. Lu * configure: Regenerated. diff --git a/libatomic/tas_n.c b/libatomic/tas_n.c index f137707..faa8e26 100644 --- a/libatomic/tas_n.c +++ b/libatomic/tas_n.c @@ -85,7 +85,7 @@ SIZE(libat_test_and_set) (UTYPE *mptr, int smodel) bool SIZE(libat_test_and_set) (UTYPE *mptr, int smodel) { - UTYPE oldval, newval; + UTYPE oldval; UWORD magic; pre_seq_barrier (smodel); @@ -97,7 +97,7 @@ SIZE(libat_test_and_set) (UTYPE *mptr, int smodel) protect_end (mptr, magic); post_seq_barrier (smodel); - return ret != 0; + return oldval != 0; } #define DONE 1 -- 2.7.4