summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-07-27 16:26:26 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2009-07-27 16:26:26 +0400
commitfcd0a743302af1e3b9b3bb1b10e2d4aad6c65437 (patch)
treecdb1aeec99274c299cf1258b514f3e04d74016ab
parent77df046f0bac6f75be7ee20bbbaf8ebb8276e5ad (diff)
downloadnasm-fcd0a743302af1e3b9b3bb1b10e2d4aad6c65437.tar.gz
nasm.c -- use list helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--nasm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nasm.c b/nasm.c
index b2ceacce..24b80c14 100644
--- a/nasm.c
+++ b/nasm.c
@@ -284,7 +284,7 @@ static void emit_dependencies(StrList *list)
}
linepos = fprintf(deps, "%s:", depend_target);
- for (l = list; l; l = l->next) {
+ list_for_each(l, list) {
len = strlen(l->str);
if (linepos + len > 62) {
fprintf(deps, " \\\n ");
@@ -295,11 +295,9 @@ static void emit_dependencies(StrList *list)
}
fprintf(deps, "\n\n");
- for (l = list; l; l = nl) {
+ list_for_each_safe(l, nl, list) {
if (depend_emit_phony)
fprintf(deps, "%s:\n\n", l->str);
-
- nl = l->next;
nasm_free(l);
}