]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use newline instead of space as separator for stats values
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Aug 2010 14:32:16 +0000 (16:32 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 1 Aug 2010 15:20:33 +0000 (17:20 +0200)
This is a backward-compatible change and makes the content somewhat easier
to inspect when debugging.

stats.c

diff --git a/stats.c b/stats.c
index c5c93433a943b259b6bb1b5dade5bf83694dc29a..d99a81367ce7cfe25cec522746de9fed7eaf9a43 100644 (file)
--- a/stats.c
+++ b/stats.c
@@ -120,11 +120,10 @@ write_stats(const char *path, unsigned counters[STATS_END])
                return;
        }
        for (i = 0; i < STATS_END; i++) {
-               if (fprintf(f, "%u ", counters[i]) < 0) {
+               if (fprintf(f, "%u\n", counters[i]) < 0) {
                        fatal("Failed to write to %s", tmp_file);
                }
        }
-       fputs("\n", f);
        fclose(f);
        x_rename(tmp_file, path);
 }