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]

[gomp4]minor libgomp cleanup


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

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