This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, libatomic] Fix cut and paste errors in libat_test_and_set
- From: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dave dot anglin at bell dot net
- Date: Sat, 19 May 2012 17:25:40 -0400
- Subject: [PATCH, libatomic] Fix cut and paste errors in libat_test_and_set
- Reply-to: John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
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