This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

minor ldlang.c cleanup


I fouled up the ChangeLog with the last commit, so I'm fixing it along
with this little cleanup.

	* ldlang.c (walk_wild_section): Move sec == NULL case out of loop.

-- 
Alan Modra

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.66
diff -u -p -w -r1.66 ldlang.c
--- ldlang.c	2001/10/31 01:12:26	1.66
+++ ldlang.c	2001/11/20 15:24:06
@@ -251,12 +251,12 @@ walk_wild_section (ptr, file, callback, 
       struct wildcard_list *sec;
 
       sec = ptr->section_list;
-      do
-	{
-	  boolean skip = false;
+      if (sec == NULL)
+	(*callback) (ptr, sec, s, file, data);
 
-	  if (sec != NULL)
+      while (sec != NULL)
 	    {
+	  boolean skip = false;
 	      struct name_list *list_tmp;
 
 	      /* Don't process sections from files which were
@@ -283,15 +283,12 @@ walk_wild_section (ptr, file, callback, 
 		  else
 		    skip = strcmp (sec->spec.name, sname) != 0;
 		}
-	    }
 
 	  if (!skip)
 	    (*callback) (ptr, sec, s, file, data);
 
-	  if (sec != NULL)
 	    sec = sec->next;
 	}
-      while (sec != NULL);
     }
 }
 


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