public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gomp4]minor libgomp cleanup
@ 2015-08-31 20:00 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2015-08-31 20:00 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

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

[-- Attachment #2: gomp4-cleanup.patch --]
[-- Type: text/x-patch, Size: 603 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-31 19:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31 20:00 [gomp4]minor libgomp cleanup Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).