This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, libatomic] Fix cut and paste errors in libat_test_and_set


Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

Ok for trunk?

-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2012-05-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR other/53231
	* tas_n.c (libat_test_and_set): Correct return.  Remove unused variable.

Index: tas_n.c
===================================================================
--- tas_n.c	(revision 187663)
+++ tas_n.c	(working copy)
@@ -85,7 +85,7 @@
 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 @@
   protect_end (mptr, magic);
   post_seq_barrier (smodel);
 
-  return ret != 0;
+  return oldval != 0;
 }
 
 #define DONE 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]