changeset 176:791eaeb4f412

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 01 Mar 2015 15:59:36 +0200
parents 3d0a1f87e393
children 2b07e452fd78
files th_config.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/th_config.c	Sun Mar 01 05:35:15 2015 +0200
+++ b/th_config.c	Sun Mar 01 15:59:36 2015 +0200
@@ -745,7 +745,7 @@
                     if (fprintf(ctx->fp, "%s = ", item->name) < 0)
                         return -3;
 
-                    while (node != NULL)
+                    for (; node != NULL; node = node->next)
                     {
                         if (node->data != NULL)
                             fprintf(ctx->fp, "\"%s\"", (char *) node->data);
@@ -755,7 +755,6 @@
                             fprintf(ctx->fp, ",\n");
                             th_print_indent(ctx, nesting);
                         }
-                        node = node->next;
                     }
 
                     if (fprintf(ctx->fp, "\n") < 0)