]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR other/53231
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2012 23:54:32 +0000 (23:54 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2012 23:54:32 +0000 (23:54 +0000)
* 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
libatomic/tas_n.c

index 4f170244a2e3b8916f255e51071c312532c8786c..ac46c3f2890622097e821713865aa3ae897c49d5 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR other/53231
+       * tas_n.c (libat_test_and_set): Correct return.  Remove unused variable.
+
 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure: Regenerated.
index f137707f711f26f407bb1e5ef9d8c876898c4a32..faa8e2637946f4466ece966cbf725762e5def931 100644 (file)
@@ -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