minor ldlang.c cleanup
Alan Modra
amodra@bigpond.net.au
Sat Nov 10 17:32:00 GMT 2001
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);
}
}
More information about the Binutils
mailing list