This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4]minor libgomp cleanup
- From: Nathan Sidwell <nathan at acm dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 31 Aug 2015 15:58:13 -0400
- Subject: [gomp4]minor libgomp cleanup
- Authentication-results: sourceware.org; auth=none
In excising shared_size, I stumbled upon this bit of strangeness. Attaching a
new node onto the end of a singly linked list is not complicated ...
nathan
2015-08-31 Nathan Sidwell <nathan@codesourcery.com>
* oacc-parallel.c (GOACC_register_static): Remove superfluous NULL
check.
Index: libgomp/oacc-parallel.c
===================================================================
--- libgomp/oacc-parallel.c (revision 227353)
+++ libgomp/oacc-parallel.c (working copy)
@@ -673,12 +661,9 @@ GOACC_register_static (void *addr, int s
s->size = (size_t) size;
s->mask = mask;
s->free = false;
- s->next = NULL;
-
- if (oacc_statics)
- s->next = oacc_statics;
+ s->next = oacc_statics;
- oacc_statics = s;
+ oacc_statics = s;
}
void